aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorPo Lu2024-02-17 10:33:54 +0800
committerPo Lu2024-02-17 10:33:54 +0800
commit537914561eb3809e34b9daf8c2b4719ae9b30a6b (patch)
treed00db6c4b205864893a676c2627a95c0a9630a04 /java
parent5b65c2ad7526ec081ac37d32c87e9b58e787d66a (diff)
downloademacs-537914561eb3809e34b9daf8c2b4719ae9b30a6b.tar.gz
emacs-537914561eb3809e34b9daf8c2b4719ae9b30a6b.zip
* java/debug.sh: Print errors correctly if device is ambiguous.
Diffstat (limited to 'java')
-rwxr-xr-xjava/debug.sh13
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
104 exit 1 104 exit 1
105fi 105fi
106 106
107if [ -z $device ]; then 107if [ `wc -w <<< "$devices"` -gt 1 ] && [ -z $device ]; then
108 device=$devices 108 echo "Multiple devices are available. Please specify one with"
109 echo "the option --device and try again."
110 exit 1
109fi 111fi
110 112
111if [ `wc -w <<< "$devices"` -gt 1 ] && [ -z device ]; then 113if [ -z $device ]; then
112 echo "Multiple devices are available. Please pick one using" 114 device=$devices
113 echo "--device and try again."
114fi 115fi
115 116
116echo "Looking for $package on device $device" 117echo "Looking for $package on device $device"
@@ -189,6 +190,8 @@ if [ "$attach_existing" != "yes" ]; then
189 package_pids=`awk -f tmp.awk <<< $package_pids` 190 package_pids=`awk -f tmp.awk <<< $package_pids`
190fi 191fi
191 192
193rm tmp.awk
194
192pid=$package_pids 195pid=$package_pids
193num_pids=`wc -w <<< "$package_pids"` 196num_pids=`wc -w <<< "$package_pids"`
194 197