mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-22 07:28:16 +01:00
fix to work when both -e and -d passed
This commit is contained in:
parent
f27e798966
commit
ad464b8861
1 changed files with 5 additions and 3 deletions
|
@ -10,15 +10,17 @@ usage() {
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
DEVICES="$(adb devices | grep 'device$' | awk '{print $1}')"
|
DEVICES=''
|
||||||
|
|
||||||
while [ $# -ge 1 ]; do
|
while [ $# -ge 1 ]; do
|
||||||
case $1 in
|
case $1 in
|
||||||
-e)
|
-e)
|
||||||
DEVICES="$(adb devices | grep '^emulator' | awk '{print $1}')"
|
DEV="$(adb devices | grep '^emulator' | awk '{print $1}')"
|
||||||
|
DEVICES="$DEVICES $DEV"
|
||||||
;;
|
;;
|
||||||
-d)
|
-d)
|
||||||
DEVICES="$(adb devices | grep -v emulator | grep 'device$' | awk '{print $1}')"
|
DEV="$(adb devices | grep -v emulator | grep 'device$' | awk '{print $1}')"
|
||||||
|
DEVICES="$DEVICES $DEV"
|
||||||
;;
|
;;
|
||||||
-p)
|
-p)
|
||||||
[ $# -gt 1 ] || usage "-p requires an argument"
|
[ $# -gt 1 ] || usage "-p requires an argument"
|
||||||
|
|
Loading…
Reference in a new issue