script to build all possible variants

This commit is contained in:
Eric House 2019-03-06 13:19:55 -08:00
parent ff7f4655f7
commit e70dc45fb1

View file

@ -0,0 +1,32 @@
#!/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
}
VARIANTS="xw4 xw4d xw4dNoSMS"
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