mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-28 09:58:30 +01:00
script to make it easier to run two or more logcat sessions
This commit is contained in:
parent
c425686589
commit
4e1e5ab303
1 changed files with 27 additions and 0 deletions
27
xwords4/android/scripts/alogcat-n.sh
Executable file
27
xwords4/android/scripts/alogcat-n.sh
Executable file
|
@ -0,0 +1,27 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -u -e
|
||||
|
||||
INDX=1
|
||||
|
||||
usage() {
|
||||
[ $# -ge 1 ] && echo "ERROR: $1"
|
||||
echo "usage: $(basename $0) [-n <1-based-indx>]"
|
||||
exit 1
|
||||
}
|
||||
|
||||
while [ $# -ge 1 ]; do
|
||||
case $1 in
|
||||
-n) shift
|
||||
[ $# -ge 1 ] || usage "-n requires a parameter"
|
||||
INDX=$1
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
DEVICE=$(adb devices | grep 'device$' | awk '{print $1}' | sed -n "${INDX}p")
|
||||
adb -s $DEVICE logcat
|
Loading…
Reference in a new issue