summarylogtreecommitdiffstats
path: root/android-env.sh
diff options
context:
space:
mode:
authorGonzalo Exequiel Pedone2019-07-22 15:34:58 -0300
committerGonzalo Exequiel Pedone2019-07-22 15:34:58 -0300
commit99528c56013767b38790711dc171d554a304207b (patch)
tree3442ae70fee336fd616e58ecae7a2dda6132acab /android-env.sh
parent94ffd40a78dc428d2303940a3da554d9190423bc (diff)
downloadaur-99528c56013767b38790711dc171d554a304207b.tar.gz
Added check_android_platform.
Diffstat (limited to 'android-env.sh')
-rwxr-xr-xandroid-env.sh13
1 files changed, 12 insertions, 1 deletions
diff --git a/android-env.sh b/android-env.sh
index b07ccf5a2ed8..7665a2ea4d98 100755
--- a/android-env.sh
+++ b/android-env.sh
@@ -41,6 +41,7 @@ if [ -z "${ANDROID_NDK_PLATFORM}" ]; then
export ANDROID_NDK_PLATFORM=android-$ANDROID_MINIMUM_PLATFORM
fi
+export ANDROID_SDK_PLATFORM=${ANDROID_HOME}/platforms/$ANDROID_API_VERSION
export ANDROID_PLATFORM=${ANDROID_NDK_HOME}/platforms/$ANDROID_NDK_PLATFORM
export ANDROID_TOOLCHAIN=${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64
export ANDROID_SYSROOT=${ANDROID_TOOLCHAIN}/sysroot
@@ -104,7 +105,17 @@ check_ndk_version_ge_than() {
if [ "${older_ver}" = "${ndk_ver}" ]; then
echo "ERROR: NDK version >= $version required."
- return 1
+ return -1
+ fi
+
+ return 0
+}
+
+check_android_platform() {
+ if [ ! -e "${ANDROID_SDK_PLATFORM}/source.properties" ]; then
+ echo "ERROR: Please, install android-platform-${ANDROID_MINIMUM_PLATFORM}."
+
+ return -1
fi
return 0