mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-08 05:24:39 +01:00
fix to install and launch based on location run from
This commit is contained in:
parent
be28630109
commit
ea3347ad4a
1 changed files with 19 additions and 3 deletions
|
@ -2,14 +2,30 @@
|
||||||
|
|
||||||
set -u -e
|
set -u -e
|
||||||
|
|
||||||
APK=./bin/XWords4-debug.apk
|
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
[ $# -ge 1 ] && echo "Error: $1"
|
[ $# -ge 1 ] && echo "Error: $1"
|
||||||
echo "usage: $(basename $0) [-e|-d] [-p /path/to/.apk]"
|
echo "usage: $(basename $0) [-e|-d] [-p /path/to/.apk]"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if [ ! -e build.xml ]; then
|
||||||
|
usage "No build.xml; please run me from the top android directory"
|
||||||
|
fi
|
||||||
|
|
||||||
|
APK=./bin/XWords4-debug.apk
|
||||||
|
DIRNAME=$(basename $(pwd))
|
||||||
|
case $DIRNAME in
|
||||||
|
XWords4-bt)
|
||||||
|
PKG=xw4bt
|
||||||
|
;;
|
||||||
|
XWords4)
|
||||||
|
PKG=xw4
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
usage "running in unexpected directory $DIRNAME"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
DEVICES=''
|
DEVICES=''
|
||||||
|
|
||||||
while [ $# -ge 1 ]; do
|
while [ $# -ge 1 ]; do
|
||||||
|
@ -48,7 +64,7 @@ for DEVICE in $DEVICES; do
|
||||||
echo $DEVICE
|
echo $DEVICE
|
||||||
adb -s $DEVICE install -r $APK
|
adb -s $DEVICE install -r $APK
|
||||||
adb -s $DEVICE shell am start \
|
adb -s $DEVICE shell am start \
|
||||||
-n org.eehouse.android.xw4/org.eehouse.android.xw4.GamesList
|
-n org.eehouse.android.${PKG}/org.eehouse.android.${PKG}.GamesList
|
||||||
COUNT=$((COUNT+1))
|
COUNT=$((COUNT+1))
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue