From 12511755a8c7297c4657c0fad7d59b77fe046b05 Mon Sep 17 00:00:00 2001 From: Eric House Date: Wed, 10 Aug 2022 18:18:08 -0700 Subject: [PATCH] require --variant parameter --- xwords4/android/scripts/arelease-clone.sh | 11 ++++++----- xwords4/android/scripts/arelease.sh | 3 +-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/xwords4/android/scripts/arelease-clone.sh b/xwords4/android/scripts/arelease-clone.sh index b9907b3c3..97c339eda 100755 --- a/xwords4/android/scripts/arelease-clone.sh +++ b/xwords4/android/scripts/arelease-clone.sh @@ -2,11 +2,10 @@ set -e -u -VARIANT=Xw4Foss - usage () { - echo "usage: $(basename $0) [--tag tagname | --branch branchname] \\" - echo " [--variant VARIANT] # default value: $VARIANT \\" + [ "$#" -gt 1 ] && echo "ERROR: $1" + echo "usage: $(basename $0) --variant VARIANT \\" + echo " [--tag tagname | --branch branchname] \\" echo " # (uses current branch as default)" echo " # e.g. $0 --tag android_beta_141 --variant Xw4d" echo "Here are some possible variants:" @@ -40,7 +39,9 @@ while [ 0 -lt $# ] ; do shift done -if [ -n "$TAG" ]; then +if [ -z "${VARIANT-}" ]; then + usage "param --variant is not optional" +elif [ -n "$TAG" ]; then if ! git tag | grep -w "$TAG"; then echo "tag $TAG not found" usage diff --git a/xwords4/android/scripts/arelease.sh b/xwords4/android/scripts/arelease.sh index 3534a0856..75f4ebf25 100755 --- a/xwords4/android/scripts/arelease.sh +++ b/xwords4/android/scripts/arelease.sh @@ -2,7 +2,6 @@ set -u -e -VARIANT=Xw4Foss TAGNAME="" FILES="" LIST_FILE='' @@ -12,7 +11,7 @@ XW_RELEASE_SCP_DEST=${XW_RELEASE_SCP_DEST:-""} usage() { echo "Error: $*" >&2 echo "usage: $0 [--tag ] [--apk-list path/to/out.txt] \\" - echo " [--variant VARIANT] # default value: $VARIANT \\" + echo " --variant " echo " []" >&2 exit 1 }