Use += instead of = to avoid clobbering the existing contents
This commit is contained in:
parent
8925975206
commit
3c70bfa2fa
|
@ -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")
|
||||
;;
|
||||
|
|
Loading…
Reference in New Issue