complain when CLASSPATH isn't set for success

This commit is contained in:
Eric House 2016-08-15 17:29:28 -07:00
parent 3b24aab8c3
commit 4857ad6b26

View file

@ -1,9 +1,10 @@
#!/bin/sh #!/bin/bash
set -e -u set -e -u
DIR="" DIR=""
NODE="" NODE=""
CLASSPATH=${CLASSPATH:-""}
usage() { usage() {
[ $# -gt 0 ] && echo "Error: $1" [ $# -gt 0 ] && echo "Error: $1"
@ -12,6 +13,11 @@ usage() {
exit 1 exit 1
} }
# Make sure android.jar is on CLASSPATH
if [ "${CLASSPATH/android.jar/}" = "$CLASSPATH" ]; then
usage "android.jar not on CLASSPATH"
fi
while [ $# -gt 1 ]; do while [ $# -gt 1 ]; do
case $1 in case $1 in
--dir) --dir)