Merge "vm_shell: don't promt the selection if only one CID is available"
diff --git a/vm/vm_shell.sh b/vm/vm_shell.sh
index 3db7003..b73a9dc 100755
--- a/vm/vm_shell.sh
+++ b/vm/vm_shell.sh
@@ -66,12 +66,16 @@
fi
if [ ! -n "${selected_cid}" ]; then
- PS3="Select CID of VM to adb-shell into: "
- select cid in ${available_cids}
- do
- selected_cid=${cid}
- break
- done
+ if [ ${#selected_cid[@]} -eq 1 ]; then
+ selected_cid=${available_cids[0]}
+ else
+ PS3="Select CID of VM to adb-shell into: "
+ select cid in ${available_cids}
+ do
+ selected_cid=${cid}
+ break
+ done
+ fi
fi
if [[ ! " ${available_cids[*]} " =~ " ${selected_cid} " ]]; then