mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-30 10:26:58 +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
|
||||
|
||||
VARIANT=xw4
|
||||
VARIANT=""
|
||||
|
||||
usage() {
|
||||
[ $# -ge 1 ] && echo "Error: $1"
|
||||
|
@ -31,10 +31,19 @@ while [ $# -ge 1 ]; do
|
|||
shift
|
||||
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
|
||||
|
||||
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}
|
||||
COUNT=$((COUNT+1))
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue