populate_sdk_base: mkdir was missing $SUDO_EXEC prefix

mkdir was in the wrong place and missing sudo rights. Hence, the
installation to default location (or any other for which the user didn't
have rights) would fail. Unless the installer itself is run with sudo.

(From OE-Core rev: 555d03c466490ab12b2b1d049736593da2334e97)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Laurentiu Palcu 2012-12-04 14:16:12 +02:00 committed by Richard Purdie
parent 2fc707a55c
commit 4bec4e7850
1 changed files with 3 additions and 3 deletions

View File

@ -187,9 +187,6 @@ if [ "$answer" != "Y" -a "$answer" != "y" ]; then
exit 1
fi
# create dir and don't care about the result.
mkdir -p $target_sdk_dir >/dev/null 2>&1
# if don't have the right to access dir, gain by sudo
if [ ! -x $target_sdk_dir -o ! -w $target_sdk_dir -o ! -r $target_sdk_dir ]; then
SUDO_EXEC=$(which "sudo")
@ -203,6 +200,9 @@ if [ ! -x $target_sdk_dir -o ! -w $target_sdk_dir -o ! -r $target_sdk_dir ]; the
[ $? -ne 0 ] && echo "Sorry, you are not allowed to execute as root." && exit 1
fi
# create dir and don't care about the result.
$SUDO_EXEC mkdir -p $target_sdk_dir >/dev/null 2>&1
payload_offset=$(($(grep -na -m1 "^MARKER:$" $0|cut -d':' -f1) + 1))
printf "Extracting SDK..."