[Android] [PATCH 1/2] compile: quote assigned value when adding to PATH

Robert Mourning robedmo.git at gmail.com
Wed May 31 01:50:18 CEST 2017


Needed if PATH contains whitespace.

---
 compile-libvlc.sh | 8 ++++----
 compile.sh        | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/compile-libvlc.sh b/compile-libvlc.sh
index 207d6ba..60d6947 100755
--- a/compile-libvlc.sh
+++ b/compile-libvlc.sh
@@ -325,16 +325,16 @@ fi
 # stub libraries
 CROSS_TOOLS=${NDK_TOOLCHAIN_PATH}/${TARGET_TUPLE}-
 
-export PATH=${NDK_TOOLCHAIN_PATH}:${PATH}
+export PATH="${NDK_TOOLCHAIN_PATH}:${PATH}"
 if [ ! -z "$MSYSTEM_PREFIX" ] ; then
     # The make.exe and awk.exe from the toolchain don't work in msys
-    export PATH=$MSYSTEM_PREFIX/bin:/usr/bin:${NDK_TOOLCHAIN_PATH}:${PATH}
+    export PATH="$MSYSTEM_PREFIX/bin:/usr/bin:${NDK_TOOLCHAIN_PATH}:${PATH}"
 fi
 
 ON_WINDOWS=0
 if [ ! -z "$MSYSTEM_PREFIX" ] ; then
     # The make.exe and awk.exe from the toolchain don't work in msys
-    export PATH=$MSYSTEM_PREFIX/bin:/usr/bin:${NDK_TOOLCHAIN_PATH}:${PATH}
+    export PATH="$MSYSTEM_PREFIX/bin:/usr/bin:${NDK_TOOLCHAIN_PATH}:${PATH}"
     ON_WINDOWS=1
 fi
 
@@ -453,7 +453,7 @@ cd vlc
 # Build buildsystem tools #
 ###########################
 
-export PATH=`pwd`/extras/tools/build/bin:$PATH
+export PATH="`pwd`/extras/tools/build/bin:$PATH"
 echo "Building tools"
 cd extras/tools
 ./bootstrap
diff --git a/compile.sh b/compile.sh
index 55b7cc9..b8c32c1 100755
--- a/compile.sh
+++ b/compile.sh
@@ -236,7 +236,7 @@ fi
 # RUN #
 #######
 if [ "$RUN" = 1 ]; then
-    export PATH=${ANDROID_SDK}/platform-tools/:$PATH
+    export PATH="${ANDROID_SDK}/platform-tools/:$PATH"
     adb wait-for-device
     if [ "$RELEASE" = 1 ]; then
         adb shell am start -n org.videolan.vlc/org.videolan.vlc.StartActivity
-- 
2.7.4



More information about the Android mailing list