summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-08-03 23:14:55 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-08-04 06:02:40 +0200
commit954e4dc962374058e056b6682ff8ba33a2ecc9dc (patch)
treeb2e0588da67d1875cf1d134fed9e5dd45092f9b2
parent71b0d8b89d4701fcf1d22e2baf1ef5d983bc10d5 (diff)
updater: check that access to mandatory externals is working
Change-Id: Ica68488f4e39c958a913936573cee67c1ff69175 Reviewed-on: https://gerrit.libreoffice.org/40754 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
-rw-r--r--bin/update/common.sh17
-rwxr-xr-xbin/update/make_full_update.sh1
2 files changed, 18 insertions, 0 deletions
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"