xwords/xwords4/android/scripts/build-all-variants.sh

33 lines
632 B
Bash
Raw Normal View History

2019-03-06 22:19:55 +01:00
#!/bin/bash
set -e -u
usage() {
[ $# -gt 0 ] && echo "ERROR: $1"
echo "usage: $0 [--with-fdroid]"
echo "builds all variants except fdroid since that build will fail outside their system"
exit 1
}
2019-03-11 17:51:23 +01:00
VARIANTS="xw4NoSMS xw4d xw4dNoSMS"
2019-03-06 22:19:55 +01:00
WD=$(cd $(dirname $0)/../ && pwd)
while [ $# -gt 0 ]; do
case $1 in
--with-fdroid)
VARIANTS="$VARIANTS xw4fdroid"
;;
*)
usage "unexpected param $1"
;;
esac
shift
done
for VARIANT in $VARIANTS; do
echo "***** building $VARIANT *****"
VARIANT=$(echo ${VARIANT:0:1} | tr '[:lower:]' '[:upper:]')${VARIANT:1}
TARGET=as${VARIANT}Deb
(cd $WD && ./gradlew clean $TARGET)
done