]> code.ossystems Code Review - openembedded-core.git/commitdiff
toolchain-shar-extract.sh: ensure extensible SDK install path obeys restrictions
authorBrendan Le Foll <brendan.le.foll@intel.com>
Mon, 7 Sep 2015 12:42:17 +0000 (13:42 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 7 Sep 2015 15:10:58 +0000 (16:10 +0100)
There are some characters that cannot appear in the installation path, so we
need to check for these

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/files/toolchain-shar-extract.sh

index 3a5099103140a60511459bc10532ff1b391bec5a..85719fa4abdfbbe13432fe20f5aaeb5afb4ab50d 100644 (file)
@@ -85,9 +85,18 @@ else
        target_sdk_dir=$(readlink -m "$target_sdk_dir")
 fi
 
-if [ -n "$(echo $target_sdk_dir|grep ' ')" ]; then
-       echo "The target directory path ($target_sdk_dir) contains spaces. Abort!"
-       exit 1
+if [ "$SDK_EXTENSIBLE" = "1" ]; then
+       # We're going to be running the build system, additional restrictions apply
+       if echo "$target_sdk_dir" | grep -q '[+\ @]'; then
+               echo "The target directory path ($target_sdk_dir) contains illegal" \
+                    "characters such as spaces, @ or +. Abort!"
+               exit 1
+       fi
+else
+       if [ -n "$(echo $target_sdk_dir|grep ' ')" ]; then
+               echo "The target directory path ($target_sdk_dir) contains spaces. Abort!"
+               exit 1
+       fi
 fi
 
 if [ -e "$target_sdk_dir/environment-setup-@REAL_MULTIMACH_TARGET_SYS@" ]; then