mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-03 23:04:08 +01:00
Uninstall variant based on where called from if unspecified
This commit is contained in:
parent
4414943f90
commit
0aadec9380
1 changed files with 11 additions and 2 deletions
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
set -u -e
|
set -u -e
|
||||||
|
|
||||||
VARIANT=xw4
|
VARIANT=""
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
[ $# -ge 1 ] && echo "Error: $1"
|
[ $# -ge 1 ] && echo "Error: $1"
|
||||||
|
@ -31,10 +31,19 @@ while [ $# -ge 1 ]; do
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [ -z $VARIANT ]; then
|
||||||
|
if [ -f AndroidManifest.xml ]; then
|
||||||
|
LINE=$(grep 'package="org.eehouse.android' AndroidManifest.xml)
|
||||||
|
VARIANT=$(echo $LINE | sed 's,.*android.\([^"]*\)",\1,')
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
[ -z $VARIANT ] && usage "Variant unknown"
|
||||||
|
|
||||||
COUNT=0
|
COUNT=0
|
||||||
|
|
||||||
for DEVICE in $DEVICES; do
|
for DEVICE in $DEVICES; do
|
||||||
echo $DEVICE
|
echo "running: adb -s $DEVICE uninstall org.eehouse.android.${VARIANT}"
|
||||||
adb -s $DEVICE uninstall org.eehouse.android.${VARIANT}
|
adb -s $DEVICE uninstall org.eehouse.android.${VARIANT}
|
||||||
COUNT=$((COUNT+1))
|
COUNT=$((COUNT+1))
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue