mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-04 23:02:02 +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
|
||||
}
|
||||
|
||||
DEVICES="$(adb devices | grep 'device$' | awk '{print $1}')"
|
||||
DEVICES=''
|
||||
|
||||
while [ $# -ge 1 ]; do
|
||||
case $1 in
|
||||
-e)
|
||||
DEVICES="$(adb devices | grep '^emulator' | awk '{print $1}')"
|
||||
DEV="$(adb devices | grep '^emulator' | awk '{print $1}')"
|
||||
DEVICES="$DEVICES $DEV"
|
||||
;;
|
||||
-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)
|
||||
[ $# -gt 1 ] || usage "-p requires an argument"
|
||||
|
|
Loading…
Reference in a new issue