From 0c4fbc364e1b22c63e0312b8a07709b178cb4869 Mon Sep 17 00:00:00 2001 From: Leonid Plyushch Date: Tue, 26 Mar 2019 01:27:09 +0200 Subject: [PATCH] build-package.sh: fix printing of error message when trying to run script on Android device --- build-package.sh | 4 ++++ scripts/build/termux_error_exit.sh | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build-package.sh b/build-package.sh index cb60c4ec9..8ac225203 100755 --- a/build-package.sh +++ b/build-package.sh @@ -3,6 +3,10 @@ set -e -o pipefail -u +if [ "$(uname -o)" = Android ]; then + termux_error_exit "On-device builds are not supported - see README.md" +fi + # Lock file to prevent parallel running in the same environment. TERMUX_BUILD_LOCK_FILE="/tmp/.termux-build.lck" if [ ! -e "$TERMUX_BUILD_LOCK_FILE" ]; then diff --git a/scripts/build/termux_error_exit.sh b/scripts/build/termux_error_exit.sh index 487a19112..99f14a3b1 100644 --- a/scripts/build/termux_error_exit.sh +++ b/scripts/build/termux_error_exit.sh @@ -2,7 +2,3 @@ termux_error_exit() { echo "ERROR: $*" 1>&2 exit 1 } - -if [ "$(uname -o)" = Android ]; then - termux_error_exit "On-device builds are not supported - see README.md" -fi