diff --git a/AndroidCompat/getAndroid.sh b/AndroidCompat/getAndroid.sh index 78b7b52..53e53e2 100755 --- a/AndroidCompat/getAndroid.sh +++ b/AndroidCompat/getAndroid.sh @@ -8,6 +8,17 @@ # This is a bash script to create android.jar stubs +for dep in "curl" "base64" "zip" +do + which $dep >/dev/null 2>&1 || { echo >&2 "Error: This script needs $dep installed."; abort=yes; } +done + +if [ $abort = yes ]; then + echo "Some of the dependencies didn't exist. Aborting." + exit 1 +fi + + # foolproof against running from AndroidCompat dir instead of running from project root if [ "$(basename $(pwd))" = "AndroidCompat" ]; then cd ..