grep is unnecessary, if showinfo fails the string is empty

This commit is contained in:
img2tab
2019-01-03 06:59:55 +00:00
committed by GitHub
parent 74ebdb9856
commit 71d00575b8
+1 -5
View File
@@ -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