summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/files/toolchain-shar-extract.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/meta/files/toolchain-shar-extract.sh b/meta/files/toolchain-shar-extract.sh
index bea6d4189a..dd9342758b 100644
--- a/meta/files/toolchain-shar-extract.sh
+++ b/meta/files/toolchain-shar-extract.sh
@@ -95,7 +95,7 @@ while getopts ":yd:npDRSl" OPT; do
95 listcontents=1 95 listcontents=1
96 ;; 96 ;;
97 *) 97 *)
98 echo "Usage: $(basename $0) [-y] [-d <dir>]" 98 echo "Usage: $(basename "$0") [-y] [-d <dir>]"
99 echo " -y Automatic yes to all prompts" 99 echo " -y Automatic yes to all prompts"
100 echo " -d <dir> Install the SDK to <dir>" 100 echo " -d <dir> Install the SDK to <dir>"
101 echo "======== Extensible SDK only options ============" 101 echo "======== Extensible SDK only options ============"
@@ -111,17 +111,17 @@ while getopts ":yd:npDRSl" OPT; do
111 esac 111 esac
112done 112done
113 113
114payload_offset=$(($(grep -na -m1 "^MARKER:$" $0|cut -d':' -f1) + 1)) 114payload_offset=$(($(grep -na -m1 "^MARKER:$" "$0"|cut -d':' -f1) + 1))
115if [ "$listcontents" = "1" ] ; then 115if [ "$listcontents" = "1" ] ; then
116 if [ @SDK_ARCHIVE_TYPE@ = "zip" ]; then 116 if [ @SDK_ARCHIVE_TYPE@ = "zip" ]; then
117 tail -n +$payload_offset $0 > sdk.zip 117 tail -n +$payload_offset "$0" > sdk.zip
118 if unzip -l sdk.zip;then 118 if unzip -l sdk.zip;then
119 rm sdk.zip 119 rm sdk.zip
120 else 120 else
121 rm sdk.zip && exit 1 121 rm sdk.zip && exit 1
122 fi 122 fi
123 else 123 else
124 tail -n +$payload_offset $0| tar tvJ || exit 1 124 tail -n +$payload_offset "$0"| tar tvJ || exit 1
125 fi 125 fi
126 exit 126 exit
127fi 127fi
@@ -242,14 +242,14 @@ fi
242 242
243printf "Extracting SDK..." 243printf "Extracting SDK..."
244if [ @SDK_ARCHIVE_TYPE@ = "zip" ]; then 244if [ @SDK_ARCHIVE_TYPE@ = "zip" ]; then
245 tail -n +$payload_offset $0 > sdk.zip 245 tail -n +$payload_offset "$0" > sdk.zip
246 if $SUDO_EXEC unzip $EXTRA_TAR_OPTIONS sdk.zip -d $target_sdk_dir;then 246 if $SUDO_EXEC unzip $EXTRA_TAR_OPTIONS sdk.zip -d $target_sdk_dir;then
247 rm sdk.zip 247 rm sdk.zip
248 else 248 else
249 rm sdk.zip && exit 1 249 rm sdk.zip && exit 1
250 fi 250 fi
251else 251else
252 tail -n +$payload_offset $0| $SUDO_EXEC tar mxJ -C $target_sdk_dir --checkpoint=.2500 $EXTRA_TAR_OPTIONS || exit 1 252 tail -n +$payload_offset "$0"| $SUDO_EXEC tar mxJ -C $target_sdk_dir --checkpoint=.2500 $EXTRA_TAR_OPTIONS || exit 1
253fi 253fi
254echo "done" 254echo "done"
255 255