fix(MOBILE/android): make scripts monorepo compatible (#866)

This diff contains minor changes to make the build scripts in here
compatible with https://github.com/bassosimone/monorepo.

See https://github.com/bassosimone/monorepo/commit/5e4c7973801dbd1a582cd21d5000e09a2ee630a7
This commit is contained in:
Simone Basso
2022-08-17 18:47:09 +02:00
committed by GitHub
parent b7cc22bcbf
commit 342a74cad8
4 changed files with 48 additions and 38 deletions
+1 -20
View File
@@ -6,26 +6,7 @@ __install_extra="build-tools;32.0.0 platforms;android-31"
__ndk_version="23.1.7779620"
GOOS=$(go env GOOS)
case $GOOS in
linux)
__sdk_dir=$HOME/Android/Sdk
;;
darwin)
__sdk_dir=$HOME/Library/Android/sdk
;;
*)
echo "FATAL: unsupported operating system" 1>&2
exit 1
;;
esac
ANDROID_HOME=${ANDROID_HOME:-$__sdk_dir}
if [[ ! -d $ANDROID_HOME ]]; then
echo "FATAL: expected to find android SDK at $ANDROID_HOME, but found nothing" 1>&2
echo "HINT: run ./MOBILE/android/setup to (re)install the SDK" 1>&2
exit 1
fi
ANDROID_HOME=$(./MOBILE/android/home)
__sdkmanager=$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager
if [[ ! -x $__sdkmanager ]]; then