check for existing VM now has different codepath for Windows and Linux

This commit is contained in:
img2tab
2019-01-03 06:04:46 +00:00
committed by GitHub
parent ac3339c77c
commit 34e587362b
+10 -1
View File
@@ -97,7 +97,16 @@ fi
# Finally done with dependencies.
if [ -n "$(VBoxManage showvminfo "${vmname}")" ]; then
if [ -z "${windows}" ]; then
if VBoxManage list vms | grep -q "${vmname}"; then
echo "${vmname} virtual machine already exists. Exiting."
exit
elif [ -n "$(VBoxManage showvminfo "${vmname}")" ]; then
echo "${vmname} virtual machine already exists. Exiting."
exit
fi
echo "${vmname} virtual machine already exists. Exiting."
exit
fi