show usage when no args provided

This commit is contained in:
Eric House 2018-04-29 20:12:22 -07:00
parent 535dc29646
commit 1e766ee52d

View file

@ -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"