From a9c18aa5a0abd396c78dd1fa36895140887a41be Mon Sep 17 00:00:00 2001 From: tenzap Date: Sat, 11 Jun 2022 14:06:58 +0200 Subject: [PATCH] replace bashism with case --- scripts/build_gapps.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/scripts/build_gapps.sh b/scripts/build_gapps.sh index 902de75..4ff574d 100755 --- a/scripts/build_gapps.sh +++ b/scripts/build_gapps.sh @@ -97,11 +97,17 @@ if [ -z "$SUPPORTEDVARIANTS" ]; then echo "ERROR: Unknown variant! aborting..." exit 1 fi -if [[ "$VARIANT" =~ _go$ ]] && [ "$API" -lt "27" ]; then - echo "ERROR! Go edition cannot be built on API level $API. Go edition appeared with API 27. + +case "$VARIANT" in +*_go) + if [ "$API" -lt "27" ]; then + echo "ERROR! Go edition cannot be built on API level $API. Go edition appeared with API 27. More info here: https://developer.android.com/docs/quality-guidelines/build-for-billions/device-capacity#androidgo" - exit 1 -fi + exit 1 + fi + ;; +esac + if [ "$ARCH" != "arm" ] && [ "$ARCH" != "arm64" ]; then #For all non-arm(64) platforms case "$VARIANT" in aroma)