From 473bea77d6122105def6d927634ca309d3db26df Mon Sep 17 00:00:00 2001 From: Eric House Date: Mon, 8 Sep 2014 07:25:05 -0700 Subject: [PATCH] get rid of -i param; instead install to all devices instead of passing 'install' to ant. --- xwords4/android/scripts/find-and-ant.sh | 34 ++++++++++++------------- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/xwords4/android/scripts/find-and-ant.sh b/xwords4/android/scripts/find-and-ant.sh index 8bb0cce48..f2bc0282e 100755 --- a/xwords4/android/scripts/find-and-ant.sh +++ b/xwords4/android/scripts/find-and-ant.sh @@ -4,33 +4,31 @@ set -e -u MANIFEST=AndroidManifest.xml INSTALL='' +CMDS='' usage() { [ $# -ge 1 ] && echo "ERROR: $1" - echo "usage: $0 [-i] " - echo " default commands: $CMDS" + echo "usage: $0 " exit 1 } -CMDS="clean debug install" - -if [ $# -ge 1 -a $1 = '-i' ]; then - INSTALL=1 - shift -fi - -if [ $# -gt 0 ]; then +while [ $# -gt 0 ]; do case $1 in - --help|-h|-help|-?) - usage - ;; - *) - CMDS="$*" - break; - ;; + --help|-h|-help|-?) + usage + ;; + clean|debug|release) + CMDS="$CMDS $1" + ;; + install) + INSTALL=1 + ;; + *) + usage "Unexpected param $1" + ;; esac shift -fi +done while [ ! -e $MANIFEST -o $(basename $(pwd)) = 'bin' ]; do [ '/' = $(pwd) ] && usage "reached root without finding $MANIFEST"