From fb7894a45d1f4dbcace710e9578c3ab7189a88ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois-Denis=20Gonthier?= Date: Tue, 6 Oct 2020 11:29:25 -0400 Subject: [PATCH] Don't 'exit' a script meant to be "source"d Running exit in a script meant to be sourced means the user shell will exit, which prevents seeing the error message, and is generally very annoying. --- android-configure | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/android-configure b/android-configure index a7cb2b9c8b4a78..ffd774e8df8a6f 100755 --- a/android-configure +++ b/android-configure @@ -10,7 +10,7 @@ if [ $# -ne 3 ]; then echo "$0 should have 3 parameters: ndk_path, target_arch and sdk_version" - exit 1 + return 1 fi NDK_PATH=$1 @@ -44,7 +44,7 @@ case $ARCH in ;; *) echo "Unsupported architecture provided: $ARCH" - exit 1 + return 1 ;; esac @@ -58,7 +58,7 @@ major=$(echo $host_gcc_version | awk -F . '{print $1}') minor=$(echo $host_gcc_version | awk -F . '{print $2}') if [ -z $major ] || [ -z $minor ] || [ $major -lt 6 ] || [ $major -eq 6 -a $minor -lt 3 ]; then echo "host gcc $host_gcc_version is too old, need gcc 6.3.0" - exit 1 + return 1 fi SUFFIX="$TOOLCHAIN_NAME$ANDROID_SDK_VERSION"