From 9b360e729bbe922bacd474772c230da1e0335c47 Mon Sep 17 00:00:00 2001 From: My Spaghetti <31696646+myspaghetti@users.noreply.github.com> Date: Wed, 14 Jul 2021 12:17:36 +0300 Subject: [PATCH] MSYS2 unofficial support MSYS does not recognize cmd.exe options with spaces between them --- macos-guest-virtualbox.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/macos-guest-virtualbox.sh b/macos-guest-virtualbox.sh index 1e16bd7..83ce9ad 100755 --- a/macos-guest-virtualbox.sh +++ b/macos-guest-virtualbox.sh @@ -2,7 +2,7 @@ # Push-button installer of macOS on VirtualBox # (c) myspaghetti, licensed under GPL2.0 or higher # url: https://github.com/myspaghetti/macos-virtualbox -# version 0.98.9 +# version 0.99.0.1 # Dependencies: bash coreutils gzip unzip wget xxd dmg2img # Optional features: tesseract-ocr tesseract-ocr-eng @@ -259,17 +259,17 @@ fi # VirtualBox in ${PATH} # Cygwin if [[ -n "$(cygcheck -V 2>/dev/null)" ]]; then - if [[ -n "$(cmd.exe /d /s /c call VBoxManage.exe -v 2>/dev/null)" ]]; then + if [[ -n "$(cmd.exe /d/s/c call VBoxManage.exe -v 2>/dev/null)" ]]; then function VBoxManage() { - cmd.exe /d /s /c call VBoxManage.exe "$@" + cmd.exe /d/s/c call VBoxManage.exe "$@" } else cmd_path_VBoxManage='C:\Program Files\Oracle\VirtualBox\VBoxManage.exe' echo "Can't find VBoxManage in PATH variable," echo "checking ${cmd_path_VBoxManage}" - if [[ -n "$(cmd.exe /d /s /c call "${cmd_path_VBoxManage}" -v 2>/dev/null)" ]]; then + if [[ -n "$(cmd.exe /d/s/c call "${cmd_path_VBoxManage}" -v 2>/dev/null)" ]]; then function VBoxManage() { - cmd.exe /d /s /c call "${cmd_path_VBoxManage}" "$@" + cmd.exe /d/s/c call "${cmd_path_VBoxManage}" "$@" } echo "Found VBoxManage" else @@ -1342,7 +1342,7 @@ for wrapper in 1; do echo "VBOX_VERSION ${vbox_ver//[$'\r\n']/}" macos_ver="$(sw_vers 2>/dev/null)" wsl_ver="$(cat /proc/sys/kernel/osrelease 2>/dev/null)" - win_ver="$(cmd.exe /d /s /c call ver 2>/dev/null)" + win_ver="$(cmd.exe /d/s/c call ver 2>/dev/null)" echo "OS VERSION ${macos_ver}${wsl_ver}${win_ver//[$'\r\n']/}" echo "################################################################################" echo "vbox.log"