summaryrefslogtreecommitdiff
path: root/meta/files/toolchain-shar-extract.sh
diff options
context:
space:
mode:
authorBrendan Le Foll <brendan.le.foll@intel.com>2015-09-07 13:42:18 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-07 16:10:58 +0100
commit5486e76cd8abb946b81cff78719d67cfb87cddc6 (patch)
treed6323f9806b18fcabc0f92439aab965aede74708 /meta/files/toolchain-shar-extract.sh
parent5aa9314c342004797e96c87868c5491ad70c13f9 (diff)
downloadopenembedded-core-5486e76cd8abb946b81cff78719d67cfb87cddc6.tar.gz
openembedded-core-5486e76cd8abb946b81cff78719d67cfb87cddc6.tar.bz2
openembedded-core-5486e76cd8abb946b81cff78719d67cfb87cddc6.zip
toolchain-shar-extract.sh: better default install path for extensible SDK
Extensible SDK cannot be installed as root so by default offer to install it in user's home directory under distro/distro_version replacing the normal SDK version '+' char with a '_' as that's a restricted character for bitbake 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>
Diffstat (limited to 'meta/files/toolchain-shar-extract.sh')
-rw-r--r--meta/files/toolchain-shar-extract.sh16
1 files changed, 12 insertions, 4 deletions
diff --git a/meta/files/toolchain-shar-extract.sh b/meta/files/toolchain-shar-extract.sh
index 85719fa4ab..27a16074b7 100644
--- a/meta/files/toolchain-shar-extract.sh
+++ b/meta/files/toolchain-shar-extract.sh
@@ -36,7 +36,6 @@ while getopts ":yd:DRS" OPT; do
case $OPT in
y)
answer="Y"
- [ "$target_sdk_dir" = "" ] && target_sdk_dir=$DEFAULT_INSTALL_DIR
;;
d)
target_sdk_dir=$OPTARG
@@ -73,9 +72,18 @@ fi
@SDK_PRE_INSTALL_COMMAND@
+# SDK_EXTENSIBLE is exposed from the SDK_PRE_INSTALL_COMMAND above
+if [ "$SDK_EXTENSIBLE" = "1" ]; then
+ DEFAULT_INSTALL_DIR="@SDKEXTPATH@"
+fi
+
if [ "$target_sdk_dir" = "" ]; then
- read -e -p "Enter target directory for SDK (default: $DEFAULT_INSTALL_DIR): " target_sdk_dir
- [ "$target_sdk_dir" = "" ] && target_sdk_dir=$DEFAULT_INSTALL_DIR
+ if [ "$answer" = "Y" ]; then
+ target_sdk_dir="$DEFAULT_INSTALL_DIR"
+ else
+ read -e -p "Enter target directory for SDK (default: $DEFAULT_INSTALL_DIR): " target_sdk_dir
+ [ "$target_sdk_dir" = "" ] && target_sdk_dir=$DEFAULT_INSTALL_DIR
+ fi
fi
eval target_sdk_dir=$(echo "$target_sdk_dir"|sed 's/ /\\ /g')
@@ -155,7 +163,7 @@ echo "done"
printf "Setting it up..."
# fix environment paths
for env_setup_script in `ls $target_sdk_dir/environment-setup-*`; do
- $SUDO_EXEC sed -e "s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:g" -i $env_setup_script
+ $SUDO_EXEC sed -e "s:@SDKPATH@:$target_sdk_dir:g" -i $env_setup_script
done
@SDK_POST_INSTALL_COMMAND@