mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-04 23:02:02 +01:00
add reinstall option
This commit is contained in:
parent
802ec24023
commit
8e21c69a55
1 changed files with 22 additions and 0 deletions
|
@ -3,7 +3,9 @@
|
|||
set -e -u
|
||||
|
||||
MANIFEST=AndroidManifest.xml
|
||||
XWORDS=org.eehouse.android.xw4
|
||||
INSTALL=''
|
||||
UNINSTALL=''
|
||||
CMDS=''
|
||||
|
||||
usage() {
|
||||
|
@ -12,6 +14,19 @@ usage() {
|
|||
exit 1
|
||||
}
|
||||
|
||||
uninstall() {
|
||||
adb devices | while read DEV TYPE; do
|
||||
case "$TYPE" in
|
||||
device)
|
||||
adb -s $DEV uninstall $XWORDS
|
||||
;;
|
||||
emulator)
|
||||
adb -s $DEV uninstall $XWORDS
|
||||
;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
while [ $# -gt 0 ]; do
|
||||
case $1 in
|
||||
--help|-h|-help|-?)
|
||||
|
@ -23,6 +38,10 @@ while [ $# -gt 0 ]; do
|
|||
install)
|
||||
INSTALL=1
|
||||
;;
|
||||
reinstall)
|
||||
UNINSTALL=1
|
||||
INSTALL=1
|
||||
;;
|
||||
*)
|
||||
usage "Unexpected param $1"
|
||||
;;
|
||||
|
@ -53,6 +72,9 @@ esac
|
|||
|
||||
ant $CMDS
|
||||
|
||||
if [ -n "$UNINSTALL" ]; then
|
||||
uninstall
|
||||
fi
|
||||
if [ -n "$INSTALL" ]; then
|
||||
adb-install.sh -e -d
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue