2022-08-17 13:16:53 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -euo pipefail
|
|
|
|
|
|
|
|
__install_extra="build-tools;32.0.0 platforms;android-31"
|
|
|
|
|
2022-08-29 18:51:25 +02:00
|
|
|
__ndk_version=$(cat ./NDKVERSION)
|
2022-08-17 13:16:53 +02:00
|
|
|
|
2022-08-17 18:47:09 +02:00
|
|
|
ANDROID_HOME=$(./MOBILE/android/home)
|
2022-08-17 13:16:53 +02:00
|
|
|
|
|
|
|
__sdkmanager=$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager
|
|
|
|
if [[ ! -x $__sdkmanager ]]; then
|
|
|
|
echo "FATAL: expected to find sdkmanager at $__sdkmanager, but found nothing" 1>&2
|
|
|
|
echo "HINT: run ./MOBILE/android/setup to (re)install the SDK" 1>&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
set -x
|
|
|
|
echo "Yes" | $__sdkmanager --install $__install_extra "ndk;$__ndk_version"
|