diff options
author | Robert Yang <liezhi.yang@windriver.com> | 2014-01-20 20:24:43 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-01-21 10:45:28 +0000 |
commit | 4b62d9fc03d7f397e2417ee028b2d8fa82ca2384 (patch) | |
tree | f0cd3bcc34647f97d3abd7b566778b6f06411721 | |
parent | 0205603ef993024c573fac10c53ae865d3ca6fa2 (diff) | |
download | poky-4b62d9fc03d7f397e2417ee028b2d8fa82ca2384.tar.gz |
e2fsprogs/populate-extfs.sh: fix a problem on dash
The dash can't handle the or [[ in parameter expansion, for example:
A=/usr/bin/[[
B=[[
C="${A%$B}"
The C should be "/usr/bin" in common, but it will be /usr/bin/[[ on
dash, use dirname to fix it.
NOTE:
There are 3 lines about parameter expansion, only fix the
DIR="${DIR%$TGT}" since the other 2 works will and are very useful in
this case.
[YOCTO #5712]
(From OE-Core rev: 22f90c5aec4f0b0360d1d960226f9965d83d589b)
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-devtools/e2fsprogs/e2fsprogs/populate-extfs.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/populate-extfs.sh b/meta/recipes-devtools/e2fsprogs/e2fsprogs/populate-extfs.sh index 7de720b115..9b55a4b912 100644 --- a/meta/recipes-devtools/e2fsprogs/e2fsprogs/populate-extfs.sh +++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/populate-extfs.sh | |||
@@ -23,7 +23,7 @@ DEBUGFS="debugfs" | |||
23 | find $SRCDIR | while read FILE; do | 23 | find $SRCDIR | while read FILE; do |
24 | TGT="${FILE##*/}" | 24 | TGT="${FILE##*/}" |
25 | DIR="${FILE#$SRCDIR}" | 25 | DIR="${FILE#$SRCDIR}" |
26 | DIR="${DIR%$TGT}" | 26 | DIR="$(dirname $DIR)" |
27 | 27 | ||
28 | # Skip the root dir | 28 | # Skip the root dir |
29 | [ ! -z "$DIR" ] || continue | 29 | [ ! -z "$DIR" ] || continue |