set -e
-SDK_DIR="$HOME/android/android-sdk-linux"
-NDK_DIR="$HOME/android/android-ndk-r10e"
+if [ -z "${ANDROID_SDK_HOME}" ];
+then echo "Please set ANDROID_SDK_HOME, exiting"; exit;
+else echo "ANDROID_SDK_HOME is ${ANDROID_SDK_HOME}";
+fi
+
+if [ -z "${ANDROID_NDK_HOME}" ];
+then echo "Please set ANDROID_NDK_HOME, exiting"; exit;
+else echo "ANDROID_NDK_HOME is ${ANDROID_NDK_HOME}";
+fi
generate_local_properties() {
: > local.properties
- echo "sdk.dir=${SDK_DIR}" >> local.properties
- echo "ndk.dir=${NDK_DIR}" >> local.properties
+ echo "sdk.dir=${ANDROID_SDK_HOME}" >> local.properties
+ echo "ndk.dir=${ANDROID_NDK_HOME}" >> local.properties
}
build() {