take .apk file as optional param

This commit is contained in:
Eric House 2012-02-22 13:01:00 -08:00 committed by Eric House
parent 840385b3ad
commit 6496736625

View file

@ -6,7 +6,7 @@ APK=./bin/XWords4-debug.apk
usage() { usage() {
[ $# -ge 1 ] && echo "Error: $1" [ $# -ge 1 ] && echo "Error: $1"
echo "usage: $(basename $0) [-e] [-d]" echo "usage: $(basename $0) [-e] [-d] [-p /path/to/.apk]"
exit 1 exit 1
} }
@ -22,6 +22,11 @@ while [ $# -ge 1 ]; do
-d) -d)
DEVICES="$DEVICES $(adb devices | grep -v emulator | grep 'device$' | awk '{print $1}')" DEVICES="$DEVICES $(adb devices | grep -v emulator | grep 'device$' | awk '{print $1}')"
;; ;;
-p)
[ $# -gt 1 ] || usage "-p requires an argument"
shift
APK=$1
;;
*) *)
usage usage
;; ;;