populate-extfs.sh: fix to handle /var/lib/opkg/alternatives/[[ correctly
There was a patch trying to fix this problem by using 'dirname', but it caused some build failures, thus got reverted. The problem is that $DIR might be empty and we should first do the check before trying to use $(dirname $DIR). [YOCTO #5712] (From OE-Core rev: 8277c71747758e2ba0815a6f5cd11c9e0c9c90ce) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
09d260e3e5
commit
8c346a66b5
|
@ -23,12 +23,13 @@ DEBUGFS="debugfs"
|
||||||
find $SRCDIR | while read FILE; do
|
find $SRCDIR | while read FILE; do
|
||||||
TGT="${FILE##*/}"
|
TGT="${FILE##*/}"
|
||||||
DIR="${FILE#$SRCDIR}"
|
DIR="${FILE#$SRCDIR}"
|
||||||
DIR="${DIR%$TGT}"
|
|
||||||
|
|
||||||
# Skip the root dir
|
# Skip the root dir
|
||||||
[ ! -z "$DIR" ] || continue
|
[ ! -z "$DIR" ] || continue
|
||||||
[ ! -z "$TGT" ] || continue
|
[ ! -z "$TGT" ] || continue
|
||||||
|
|
||||||
|
DIR="$(dirname $DIR)"
|
||||||
|
|
||||||
if [ "$DIR" != "$CWD" ]; then
|
if [ "$DIR" != "$CWD" ]; then
|
||||||
echo "cd $DIR"
|
echo "cd $DIR"
|
||||||
CWD="$DIR"
|
CWD="$DIR"
|
||||||
|
|
Loading…
Reference in New Issue