build script: Exit if ANDROID_HOME environment variable is not set

This commit is contained in:
Jack Grigg 2019-01-15 11:38:40 -08:00
parent 41bb9a1a4b
commit e3b85f0e97
No known key found for this signature in database
GPG Key ID: 1B8D649257DB0829
1 changed files with 1 additions and 0 deletions

View File

@ -14,6 +14,7 @@ function generate_standalone_ndk()
# Try to find and print some info about the NDK based on the location of the toolchain script
if [ ! -f "$standalone_script" ]; then
echo "NDK not found. Please make sure that ANDROID_HOME is set and the NDK has been installed there"
exit 40
else
echo "Standalone NDK files appear to be missing.\n Attempting to install them..."
ndk_dir=$(dirname $(dirname $(dirname $standalone_script 2>/dev/null) 2>/dev/null) 2>/dev/null)