[OE-core] [PATCH V2 1/3] toolchain-shar-extract.sh: ensure extensible SDK install path obeys restrictions
brendan.le.foll at intel.com
brendan.le.foll at intel.com
Thu Aug 20 21:38:20 UTC 2015
From: Brendan Le Foll <brendan.le.foll at intel.com>
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 at intel.com>
---
meta/files/toolchain-shar-extract.sh | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/meta/files/toolchain-shar-extract.sh b/meta/files/toolchain-shar-extract.sh
index 3a50991..0a95aba 100644
--- a/meta/files/toolchain-shar-extract.sh
+++ b/meta/files/toolchain-shar-extract.sh
@@ -85,9 +85,12 @@ 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
+ if [[ "$target_sdk_dir" =~ [+\ @] ]]; then
+ echo "The target directory path ($target_sdk_dir) contains illegal" \
+ "characters such as spaces, @ or +. Abort!"
+ exit 1
+ fi
fi
if [ -e "$target_sdk_dir/environment-setup- at REAL_MULTIMACH_TARGET_SYS@" ]; then
--
2.5.0
More information about the Openembedded-core
mailing list