2023-10-27 20:39:06 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
DIR=/tmp/build_$$_dir
|
|
|
|
mkdir -p $DIR
|
|
|
|
pushd $DIR
|
|
|
|
|
2024-01-05 20:21:58 +01:00
|
|
|
usage() {
|
|
|
|
[ $# -ge 1 ] && echo "Error: $1"
|
|
|
|
echo "builds debug variant from the current tip of github"
|
|
|
|
echo "(last modified Jan 2024)"
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
|
|
|
while [ $# -ge 1 ]; do
|
|
|
|
case $1 in
|
|
|
|
--help)
|
|
|
|
usage
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
usage "unexpected command $1"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
shift
|
|
|
|
done
|
|
|
|
|
2023-10-27 20:39:06 +02:00
|
|
|
git clone https://github.com/eehouse/xwords.git
|
|
|
|
cd xwords/xwords4/android
|
|
|
|
./gradlew asXw4dDeb
|
|
|
|
|
2024-01-05 20:21:58 +01:00
|
|
|
APK="$(find . -name '*.apk')"
|
2023-10-27 20:39:06 +02:00
|
|
|
if [ -n "${XW4D_UPLOAD}" ]; then
|
2024-01-05 20:21:58 +01:00
|
|
|
scp "$APK" ${XW4D_UPLOAD}
|
|
|
|
echo "uploaded $APK"
|
2023-10-27 20:39:06 +02:00
|
|
|
else
|
2024-01-05 20:21:58 +01:00
|
|
|
echo "not uploading $APK: XW4D_UPLOAD not set" >&2
|
2023-10-27 20:39:06 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
popd
|
|
|
|
rm -rf $DIR
|