mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-18 22:26:30 +01:00
deal better with unset variable
This commit is contained in:
parent
185f25953d
commit
cc2f145fc2
1 changed files with 8 additions and 1 deletions
|
@ -7,12 +7,17 @@ FILES=""
|
||||||
LIST_FILE=''
|
LIST_FILE=''
|
||||||
XW_WWW_PATH=${XW_WWW_PATH:-""}
|
XW_WWW_PATH=${XW_WWW_PATH:-""}
|
||||||
XW_RELEASE_SCP_DEST=${XW_RELEASE_SCP_DEST:-""}
|
XW_RELEASE_SCP_DEST=${XW_RELEASE_SCP_DEST:-""}
|
||||||
|
VARIANT=""
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
echo "Error: $*" >&2
|
echo "Error: $*" >&2
|
||||||
echo "usage: $0 [--tag <name>] [--apk-list path/to/out.txt] \\"
|
echo "usage: $0 [--tag <name>] [--apk-list path/to/out.txt] \\"
|
||||||
echo " --variant <VARIANT> "
|
echo " --variant <VARIANT> "
|
||||||
echo " [<package-unsigned.apk>]" >&2
|
echo " [<package-unsigned.apk>]" >&2
|
||||||
|
echo "Here are some possible variants:"
|
||||||
|
for VAR in $(./gradlew tasks | grep assembleXw4 | awk '{print $1}' | sed -e 's/assemble//'); do
|
||||||
|
echo " $VAR"
|
||||||
|
done
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,7 +63,9 @@ if [ -n "$TAGNAME" ]; then
|
||||||
git stash
|
git stash
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$FILES" ]; then
|
if [ -z "$VARIANT" ]; then
|
||||||
|
usage "--variant not optional"
|
||||||
|
elif [ -z "$FILES" ]; then
|
||||||
do_build
|
do_build
|
||||||
for f in $(ls $(dirname $0)/../app/build/outputs/apk/*/release/*-release-unsigned-*.apk); do
|
for f in $(ls $(dirname $0)/../app/build/outputs/apk/*/release/*-release-unsigned-*.apk); do
|
||||||
$(dirname $0)/sign-align.sh --apk $f
|
$(dirname $0)/sign-align.sh --apk $f
|
||||||
|
|
Loading…
Reference in a new issue