grep is unnecessary, if showinfo fails the string is empty
This commit is contained in:
+1
-5
@@ -98,11 +98,7 @@ fi
|
|||||||
# Finally done with dependencies.
|
# Finally done with dependencies.
|
||||||
|
|
||||||
|
|
||||||
if [ -z "${windows}" ]; then
|
if [ -n "$(VBoxManage showvminfo "${vmname}")" ]; 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."
|
echo "${vmname} virtual machine already exists. Exiting."
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user