From 71d00575b8ccc55b49762b6174d63114a0088e25 Mon Sep 17 00:00:00 2001 From: img2tab <31696646+img2tab@users.noreply.github.com> Date: Thu, 3 Jan 2019 06:59:55 +0000 Subject: [PATCH] grep is unnecessary, if showinfo fails the string is empty --- macos_okiomov.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/macos_okiomov.sh b/macos_okiomov.sh index 353499c..c58f6e2 100644 --- a/macos_okiomov.sh +++ b/macos_okiomov.sh @@ -98,11 +98,7 @@ fi # Finally done with dependencies. -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 +if [ -n "$(VBoxManage showvminfo "${vmname}")" ]; then echo "${vmname} virtual machine already exists. Exiting." exit fi