mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-28 07:58:08 +01:00
fix to work on devices too
This commit is contained in:
parent
e7a5882ed9
commit
ca7a0a5913
1 changed files with 33 additions and 2 deletions
|
@ -1,5 +1,36 @@
|
|||
#!/bin/sh
|
||||
|
||||
for DEVICE in $(adb devices | grep '^emulator' | sed 's/device//'); do
|
||||
adb -s $DEVICE uninstall org.eehouse.android.xw4
|
||||
set -u -e
|
||||
|
||||
usage() {
|
||||
[ $# -ge 1 ] && echo "Error: $1"
|
||||
echo "usage: $(basename $0) [-e] [-d]"
|
||||
exit 1
|
||||
}
|
||||
|
||||
DEVICES=""
|
||||
|
||||
while [ $# -ge 1 ]; do
|
||||
case $1 in
|
||||
-e)
|
||||
DEVICES="$DEVICES $(adb devices | grep '^emulator' | awk '{print $1}')"
|
||||
;;
|
||||
-d)
|
||||
DEVICES="$DEVICES $(adb devices | grep -v emulator | grep 'device$' | awk '{print $1}')"
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
COUNT=0
|
||||
|
||||
for DEVICE in $DEVICES; do
|
||||
echo $DEVICE
|
||||
adb -s $DEVICE uninstall org.eehouse.android.xw4
|
||||
COUNT=$((COUNT+1))
|
||||
done
|
||||
|
||||
echo "removed from $COUNT devices/emulators"
|
||||
|
|
Loading…
Add table
Reference in a new issue