]> code.ossystems Code Review - openembedded-core.git/commitdiff
oe-init-build-env: fix for build dirs that have spaces in their path
authorJoshua Lock <joshua.lock@collabora.co.uk>
Mon, 13 Apr 2015 15:30:02 +0000 (16:30 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 13 Apr 2015 21:29:04 +0000 (22:29 +0100)
Enclose expansions of BUILDDIR in quotes in order to correctly handle paths
which include spaces.

Signed-off-by: Joshua Lock <joshua.lock@collabora.co.uk>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
oe-init-build-env
scripts/oe-setup-builddir

index 52495133fd447ed4365ad1869457d9a4ab62fb93..6fee5f72a634b500d4e137a693cdb1306aedc496 100755 (executable)
@@ -46,7 +46,7 @@ OEROOT=`readlink -f "$OEROOT"`
 export OEROOT
 . $OEROOT/scripts/oe-buildenv-internal && \
      $OEROOT/scripts/oe-setup-builddir && \
-     [ -n "$BUILDDIR" ] && cd $BUILDDIR
+     [ -n "$BUILDDIR" ] && cd "$BUILDDIR"
 unset OEROOT
 unset BBPATH
 unset THIS_SCRIPT
index f73aa3416d5366e5b75265f7aff86db4187996be..add0b50e25506ca4c2c9db866633485a674abe83 100755 (executable)
@@ -23,7 +23,7 @@ if [ -z "$BUILDDIR" ]; then
     exit 1
 fi
 
-mkdir -p $BUILDDIR/conf
+mkdir -p "$BUILDDIR/conf"
 
 if [ ! -d "$BUILDDIR" ]; then
     echo >&2 "Error: The builddir ($BUILDDIR) does not exist!"
@@ -38,13 +38,13 @@ fi
 cd "$BUILDDIR"
 
 if [ -f "$BUILDDIR/conf/templateconf.cfg" ]; then
-    TEMPLATECONF=$(cat $BUILDDIR/conf/templateconf.cfg)
+    TEMPLATECONF=$(cat "$BUILDDIR/conf/templateconf.cfg")
 fi
 
 . $OEROOT/.templateconf
 
 if [ ! -f "$BUILDDIR/conf/templateconf.cfg" ]; then
-    echo "$TEMPLATECONF" >$BUILDDIR/conf/templateconf.cfg
+    echo "$TEMPLATECONF" >"$BUILDDIR/conf/templateconf.cfg"
 fi
 
 # 
@@ -79,7 +79,7 @@ advantage of multiple cores for example. See the file for more information as
 common configuration options are commented.
 
 EOM
-    cp -f $OECORELOCALCONF $BUILDDIR/conf/local.conf
+    cp -f $OECORELOCALCONF "$BUILDDIR/conf/local.conf"
     SHOWYPDOC=yes
 fi
 
@@ -100,7 +100,7 @@ EOM
     # to replace it for compatibility.
     sed -e "s|##OEROOT##|$OEROOT|g" \
         -e "s|##COREBASE##|$OEROOT|g" \
-        $OECORELAYERCONF > $BUILDDIR/conf/bblayers.conf
+        $OECORELAYERCONF > "$BUILDDIR/conf/bblayers.conf"
     SHOWYPDOC=yes
 fi