Use += instead of = to avoid clobbering the existing contents

This commit is contained in:
David Thurstenson 2020-08-12 10:12:50 -05:00
parent 8925975206
commit 3c70bfa2fa
1 changed files with 4 additions and 4 deletions

View File

@ -6,7 +6,7 @@ declare -A cmdstring
declare -A uri
declare -a opts
cmdstring[domain]="win10"
cmdstring=([domain]="win10")
uri=([remote]="qemu+ssh://kd-laptop/system"
[remotespice]="spice://10.10.0.14:5900"
@ -15,7 +15,7 @@ uri=([remote]="qemu+ssh://kd-laptop/system"
case "$(uname -n)" in
kd-laptop)
cmdstring=([cmd]="virt-viewer"
cmdstring+=([cmd]="virt-viewer"
[uri]=${uri[local]}
[manuri]=${uri[local]})
opts=("--connect=${cmdstring[uri]}"
@ -25,7 +25,7 @@ case "$(uname -n)" in
"${cmdstring[domain]}")
;;
*)
cmdstring=([cmd]="remote-viewer"
cmdstring+=([cmd]="remote-viewer"
[uri]=${uri[remotespice]}
[manuri]=${uri[remote]})
opts=("${cmdstring[uri]}")
@ -35,7 +35,7 @@ esac
while :; do
case $1 in
-m)
cmdstring=([cmd]="virt-manager")
cmdstring+=([cmd]="virt-manager")
opts=("--connect=${cmdstring[manuri]}"
"--show-domain-editor")
;;