[Android] compile: quote assigned value when adding to PATH

Robert Mourning git at videolan.org
Wed May 31 13:51:59 CEST 2017


vlc-android | branch: master | Robert Mourning <robedmo.git at gmail.com> | Tue May 30 19:50:18 2017 -0400| [d3d594c42b0eacc560d2ae7c97fe9c59e443cd4d] | committer: Geoffrey Métais

compile: quote assigned value when adding to PATH

Needed if PATH contains whitespace.

Signed-off-by: Geoffrey Métais <geoffrey.metais at gmail.com>

> https://code.videolan.org/videolan/vlc-android/commit/d3d594c42b0eacc560d2ae7c97fe9c59e443cd4d
---

 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 207d6ba6a..60d694715 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 55b7cc9eb..b8c32c12a 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



More information about the Android mailing list