summaryrefslogtreecommitdiff
path: root/meta/files
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-01-23 00:59:55 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-22 23:42:56 +0000
commit176e2bddb45b417b0bfbcdcd95bd5e81505e1e5b (patch)
treeb72b20165a9718b2367be4114aa76493fa84557d /meta/files
parent59fc4bdefb3853d6893b9e3792018d54bb6bf99f (diff)
downloadopenembedded-core-176e2bddb45b417b0bfbcdcd95bd5e81505e1e5b.tar.gz
openembedded-core-176e2bddb45b417b0bfbcdcd95bd5e81505e1e5b.tar.bz2
openembedded-core-176e2bddb45b417b0bfbcdcd95bd5e81505e1e5b.zip
toolchain-shar-extract.sh: improve behaviour when xz is not installed
Currently if xz isn't installed when installing the SDK you get an error from tar and then the SDK installation continues, cascading into a load of other failures since files are missing. Add a check to see if xz can be run and error out if it can't, and also exit if tar fails. 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.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/meta/files/toolchain-shar-extract.sh b/meta/files/toolchain-shar-extract.sh
index b1ef4b7668..d844771de0 100644
--- a/meta/files/toolchain-shar-extract.sh
+++ b/meta/files/toolchain-shar-extract.sh
@@ -29,6 +29,11 @@ if [ "$INST_ARCH" != "$SDK_ARCH" ]; then
fi
fi
+if ! xz -V > /dev/null 2>&1; then
+ echo "Error: xz is required for installation of this SDK, please install it first"
+ exit 1
+fi
+
DEFAULT_INSTALL_DIR="@SDKPATH@"
SUDO_EXEC=""
target_sdk_dir=""
@@ -168,7 +173,7 @@ fi
payload_offset=$(($(grep -na -m1 "^MARKER:$" $0|cut -d':' -f1) + 1))
printf "Extracting SDK..."
-tail -n +$payload_offset $0| $SUDO_EXEC tar xJ -C $target_sdk_dir --checkpoint=.2500
+tail -n +$payload_offset $0| $SUDO_EXEC tar xJ -C $target_sdk_dir --checkpoint=.2500 || exit 1
echo "done"
printf "Setting it up..."