From 954e4dc962374058e056b6682ff8ba33a2ecc9dc Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Thu, 3 Aug 2017 23:14:55 +0200 Subject: updater: check that access to mandatory externals is working Change-Id: Ica68488f4e39c958a913936573cee67c1ff69175 Reviewed-on: https://gerrit.libreoffice.org/40754 Reviewed-by: Markus Mohrhard Tested-by: Markus Mohrhard --- bin/update/common.sh | 17 +++++++++++++++++ bin/update/make_full_update.sh | 1 + 2 files changed, 18 insertions(+) (limited to 'bin/update') diff --git a/bin/update/common.sh b/bin/update/common.sh index eb358806fd04..5bba576c702c 100644 --- a/bin/update/common.sh +++ b/bin/update/common.sh @@ -26,6 +26,23 @@ get_file_size() { echo ${info[4]} } +check_externals() { + + # check whether we can call the mar executable + "$MAR" --version > /dev/null 2>&1 + if [ $? != 0 ]; then + notice "Could not find a valid mar executable in the path or in the MAR environment variable" + exit 1 + fi + + # check whether we can access the bzip2 executable + "$BZIP2" --help > /dev/null 2>&1 + if [ $? != 0 ]; then + notice "Could not find a valid bzip2 executable in the PATH or in the BZIP2 environment variable" + exit 1 + fi +} + copy_perm() { reference="$1" target="$2" diff --git a/bin/update/make_full_update.sh b/bin/update/make_full_update.sh index 2c0faef200f8..cb7de49b23d4 100755 --- a/bin/update/make_full_update.sh +++ b/bin/update/make_full_update.sh @@ -32,6 +32,7 @@ if [ $1 = -h ]; then exit 1 fi +check_externals # ----------------------------------------------------------------------------- archive="$1" -- cgit