diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2024-04-01 18:50:20 +0800 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2024-04-01 18:50:20 +0800 |
commit | 0fef2018445b257bf26814e6659bc2ff5b270d77 (patch) | |
tree | 2310ce1fd8781a6203ec56e2f985f6adfcc2278d /java/debug.sh | |
parent | 3a8546615a38337dc991f6546ade63a372edc2ca (diff) | |
parent | 49f76dcc17055e60569b6096e8ea3c9961ebbf63 (diff) | |
download | emacs-0fef2018445b257bf26814e6659bc2ff5b270d77.tar.gz |
Merge branch 'athena/unstable' into athena/bookworm-backports
Diffstat (limited to 'java/debug.sh')
-rwxr-xr-x | java/debug.sh | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/java/debug.sh b/java/debug.sh index 8fc03d014cf..c5d40141355 100755 --- a/java/debug.sh +++ b/java/debug.sh @@ -104,13 +104,14 @@ if [ -z "$devices" ]; then exit 1 fi -if [ -z $device ]; then - device=$devices +if [ `wc -w <<< "$devices"` -gt 1 ] && [ -z $device ]; then + echo "Multiple devices are available. Please specify one with" + echo "the option --device and try again." + exit 1 fi -if [ `wc -w <<< "$devices"` -gt 1 ] && [ -z device ]; then - echo "Multiple devices are available. Please pick one using" - echo "--device and try again." +if [ -z $device ]; then + device=$devices fi echo "Looking for $package on device $device" @@ -189,6 +190,8 @@ if [ "$attach_existing" != "yes" ]; then package_pids=`awk -f tmp.awk <<< $package_pids` fi +rm tmp.awk + pid=$package_pids num_pids=`wc -w <<< "$package_pids"` |