summaryrefslogtreecommitdiffstats
path: root/meta/files/toolchain-shar-extract.sh
diff options
context:
space:
mode:
authorRandy Witt <randy.e.witt@linux.intel.com>2015-07-16 13:34:21 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-07-20 10:40:40 +0100
commit2563aa55281c60c877d8a298b6884ee7da550234 (patch)
tree46b239e6fac44e050c7741db7c871ffb5c95b169 /meta/files/toolchain-shar-extract.sh
parent873b8edd4100aa6a0d21e2bea20fbe7539de041a (diff)
downloadpoky-2563aa55281c60c877d8a298b6884ee7da550234.tar.gz
extensible sdk: Error when trying to install as root.
Since the extensible sdk uses bitbake, which can't run as root, the sdk shouldn't be installed as root. Previously it would error out late into setup when bitbake errored saying not to run bitbake as root. Now the script errors with a message saying the extensible sdk can't be installed as root. [Yocto #7545] (From OE-Core rev: 309e8f4e536148056223f50637ed291c48d148ca) Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@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.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/meta/files/toolchain-shar-extract.sh b/meta/files/toolchain-shar-extract.sh
index 8cb8783f97..0a33ee8f5d 100644
--- a/meta/files/toolchain-shar-extract.sh
+++ b/meta/files/toolchain-shar-extract.sh
@@ -71,6 +71,8 @@ if [ $verbose = 1 ] ; then
71 set -x 71 set -x
72fi 72fi
73 73
74@SDK_PRE_INSTALL_COMMAND@
75
74if [ "$target_sdk_dir" = "" ]; then 76if [ "$target_sdk_dir" = "" ]; then
75 read -e -p "Enter target directory for SDK (default: $DEFAULT_INSTALL_DIR): " target_sdk_dir 77 read -e -p "Enter target directory for SDK (default: $DEFAULT_INSTALL_DIR): " target_sdk_dir
76 [ "$target_sdk_dir" = "" ] && target_sdk_dir=$DEFAULT_INSTALL_DIR 78 [ "$target_sdk_dir" = "" ] && target_sdk_dir=$DEFAULT_INSTALL_DIR
@@ -116,6 +118,11 @@ mkdir -p $target_sdk_dir >/dev/null 2>&1
116 118
117# if don't have the right to access dir, gain by sudo 119# if don't have the right to access dir, gain by sudo
118if [ ! -x $target_sdk_dir -o ! -w $target_sdk_dir -o ! -r $target_sdk_dir ]; then 120if [ ! -x $target_sdk_dir -o ! -w $target_sdk_dir -o ! -r $target_sdk_dir ]; then
121 if [ "$SDK_EXTENSIBLE" = "1" ]; then
122 echo "Unable to access \"$target_sdk_dir\"."
123 exit 1
124 fi
125
119 SUDO_EXEC=$(which "sudo") 126 SUDO_EXEC=$(which "sudo")
120 if [ -z $SUDO_EXEC ]; then 127 if [ -z $SUDO_EXEC ]; then
121 echo "No command 'sudo' found, please install sudo first. Abort!" 128 echo "No command 'sudo' found, please install sudo first. Abort!"