Use local variables

This commit is contained in:
Anthony Rose 2023-02-16 20:37:30 +00:00
parent 1ce5142230
commit e303284bae

View file

@ -380,8 +380,8 @@ tlscheck () {
} }
virtinst () { virtinst () {
_acp_vm_root="$HOME/virt/images" local _acp_vm_root="$HOME/virt/images"
_acp_vm_session=qemu:///session local _acp_vm_session=qemu:///session
case "$1" in case "$1" in
"--help" | -*) "--help" | -*)
@ -398,7 +398,7 @@ virtinst () {
mkdir -p "$_acp_vm_root" mkdir -p "$_acp_vm_root"
fi fi
_acp_vm_name=$1 local _acp_vm_name=$1
virt-install --connect $_acp_vm_session \ virt-install --connect $_acp_vm_session \
--osinfo linux2020 \ --osinfo linux2020 \
@ -411,10 +411,6 @@ virtinst () {
--video virtio \ --video virtio \
--autoconsole none \ --autoconsole none \
--name $* --name $*
unset _acp_vm_name
unset _acp_vm_session
unset _acp_vm_root
} }
if [ -r "$XDG_CONFIG_HOME/profile.local" ] if [ -r "$XDG_CONFIG_HOME/profile.local" ]