diff options
Diffstat (limited to 'meta/files/toolchain-shar-extract.sh')
-rw-r--r-- | meta/files/toolchain-shar-extract.sh | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/meta/files/toolchain-shar-extract.sh b/meta/files/toolchain-shar-extract.sh index 156085b500..ccc4f4e1ac 100644 --- a/meta/files/toolchain-shar-extract.sh +++ b/meta/files/toolchain-shar-extract.sh | |||
@@ -113,7 +113,16 @@ done | |||
113 | 113 | ||
114 | payload_offset=$(($(grep -na -m1 "^MARKER:$" $0|cut -d':' -f1) + 1)) | 114 | payload_offset=$(($(grep -na -m1 "^MARKER:$" $0|cut -d':' -f1) + 1)) |
115 | if [ "$listcontents" = "1" ] ; then | 115 | if [ "$listcontents" = "1" ] ; then |
116 | tail -n +$payload_offset $0| tar tvJ || exit 1 | 116 | if [ @SDK_ARCHIVE_TYPE@ = "zip" ]; then |
117 | tail -n +$payload_offset $0 > sdk.zip | ||
118 | if unzip -l sdk.zip;then | ||
119 | rm sdk.zip | ||
120 | else | ||
121 | rm sdk.zip && exit 1 | ||
122 | fi | ||
123 | else | ||
124 | tail -n +$payload_offset $0| tar tvJ || exit 1 | ||
125 | fi | ||
117 | exit | 126 | exit |
118 | fi | 127 | fi |
119 | 128 | ||
@@ -232,7 +241,16 @@ if [ ! -x $target_sdk_dir -o ! -w $target_sdk_dir -o ! -r $target_sdk_dir ]; the | |||
232 | fi | 241 | fi |
233 | 242 | ||
234 | printf "Extracting SDK..." | 243 | printf "Extracting SDK..." |
235 | tail -n +$payload_offset $0| $SUDO_EXEC tar xJ -C $target_sdk_dir --checkpoint=.2500 $EXTRA_TAR_OPTIONS || exit 1 | 244 | if [ @SDK_ARCHIVE_TYPE@ = "zip" ]; then |
245 | tail -n +$payload_offset $0 > sdk.zip | ||
246 | if $SUDO_EXEC unzip $EXTRA_TAR_OPTIONS sdk.zip -d $target_sdk_dir;then | ||
247 | rm sdk.zip | ||
248 | else | ||
249 | rm sdk.zip && exit 1 | ||
250 | fi | ||
251 | else | ||
252 | tail -n +$payload_offset $0| $SUDO_EXEC tar xJ -C $target_sdk_dir --checkpoint=.2500 $EXTRA_TAR_OPTIONS || exit 1 | ||
253 | fi | ||
236 | echo "done" | 254 | echo "done" |
237 | 255 | ||
238 | printf "Setting it up..." | 256 | printf "Setting it up..." |