diff options
author | Brendan Le Foll <brendan.le.foll@intel.com> | 2015-09-07 13:42:18 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-09-09 14:27:40 +0100 |
commit | 08d07355c5b807693a059bf7dc4dc614350bd53f (patch) | |
tree | 8348671c80e796fc1f140578e478c5da55efa25c /meta/files | |
parent | f5f9185344df1408e4bccfecd352373522721910 (diff) | |
download | poky-08d07355c5b807693a059bf7dc4dc614350bd53f.tar.gz |
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
(From OE-Core rev: 5486e76cd8abb946b81cff78719d67cfb87cddc6)
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')
-rw-r--r-- | meta/files/toolchain-shar-extract.sh | 16 |
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 | |||
36 | case $OPT in | 36 | case $OPT in |
37 | y) | 37 | y) |
38 | answer="Y" | 38 | answer="Y" |
39 | [ "$target_sdk_dir" = "" ] && target_sdk_dir=$DEFAULT_INSTALL_DIR | ||
40 | ;; | 39 | ;; |
41 | d) | 40 | d) |
42 | target_sdk_dir=$OPTARG | 41 | target_sdk_dir=$OPTARG |
@@ -73,9 +72,18 @@ fi | |||
73 | 72 | ||
74 | @SDK_PRE_INSTALL_COMMAND@ | 73 | @SDK_PRE_INSTALL_COMMAND@ |
75 | 74 | ||
75 | # SDK_EXTENSIBLE is exposed from the SDK_PRE_INSTALL_COMMAND above | ||
76 | if [ "$SDK_EXTENSIBLE" = "1" ]; then | ||
77 | DEFAULT_INSTALL_DIR="@SDKEXTPATH@" | ||
78 | fi | ||
79 | |||
76 | if [ "$target_sdk_dir" = "" ]; then | 80 | if [ "$target_sdk_dir" = "" ]; then |
77 | read -e -p "Enter target directory for SDK (default: $DEFAULT_INSTALL_DIR): " target_sdk_dir | 81 | if [ "$answer" = "Y" ]; then |
78 | [ "$target_sdk_dir" = "" ] && target_sdk_dir=$DEFAULT_INSTALL_DIR | 82 | target_sdk_dir="$DEFAULT_INSTALL_DIR" |
83 | else | ||
84 | read -e -p "Enter target directory for SDK (default: $DEFAULT_INSTALL_DIR): " target_sdk_dir | ||
85 | [ "$target_sdk_dir" = "" ] && target_sdk_dir=$DEFAULT_INSTALL_DIR | ||
86 | fi | ||
79 | fi | 87 | fi |
80 | 88 | ||
81 | eval target_sdk_dir=$(echo "$target_sdk_dir"|sed 's/ /\\ /g') | 89 | eval target_sdk_dir=$(echo "$target_sdk_dir"|sed 's/ /\\ /g') |
@@ -155,7 +163,7 @@ echo "done" | |||
155 | printf "Setting it up..." | 163 | printf "Setting it up..." |
156 | # fix environment paths | 164 | # fix environment paths |
157 | for env_setup_script in `ls $target_sdk_dir/environment-setup-*`; do | 165 | for env_setup_script in `ls $target_sdk_dir/environment-setup-*`; do |
158 | $SUDO_EXEC sed -e "s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:g" -i $env_setup_script | 166 | $SUDO_EXEC sed -e "s:@SDKPATH@:$target_sdk_dir:g" -i $env_setup_script |
159 | done | 167 | done |
160 | 168 | ||
161 | @SDK_POST_INSTALL_COMMAND@ | 169 | @SDK_POST_INSTALL_COMMAND@ |