From 1e766ee52de63dbb904c267d1565c75943b50bbc Mon Sep 17 00:00:00 2001 From: Eric House Date: Sun, 29 Apr 2018 20:12:22 -0700 Subject: [PATCH] show usage when no args provided --- xwords4/android/scripts/sign-align.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xwords4/android/scripts/sign-align.sh b/xwords4/android/scripts/sign-align.sh index e2e0548c7..9c4faf2a6 100755 --- a/xwords4/android/scripts/sign-align.sh +++ b/xwords4/android/scripts/sign-align.sh @@ -8,7 +8,7 @@ LIST_FILE=1 usage() { [ $# -gt 0 ] && echo "ERROR: $1" - echo "usage: $0 [--apk path/to/unsigned.apk]*" + echo "usage: $0 [--apk path/to/unsigned.apk]+" } while [ $# -gt 0 ]; do @@ -25,6 +25,8 @@ while [ $# -gt 0 ]; do shift done +[ -z "$APKS" ] && usage "no apks provided" + for APK in $APKS; do if [ ${APK/-unsigned} == $APK ]; then echo "$APK not unsigned; skipping"