better VirtualBox version checking for Catalina

This commit is contained in:
Jack
2020-02-20 22:42:00 +02:00
parent dba08098f2
commit 6397460b35
+5 -4
View File
@@ -2,7 +2,7 @@
# Push-button installer of macOS on VirtualBox # Push-button installer of macOS on VirtualBox
# (c) myspaghetti, licensed under GPL2.0 or higher # (c) myspaghetti, licensed under GPL2.0 or higher
# url: https://github.com/myspaghetti/macos-guest-virtualbox # url: https://github.com/myspaghetti/macos-guest-virtualbox
# version 0.87.4 # version 0.87.5
# Requirements: 40GB available storage on host # Requirements: 40GB available storage on host
# Dependencies: bash >= 4.3, xxd, gzip, unzip, wget, dmg2img, # Dependencies: bash >= 4.3, xxd, gzip, unzip, wget, dmg2img,
@@ -301,14 +301,15 @@ if [[ "${macOS_release_name:0:1}" =~ [Cc] ]]; then
macOS_release_name="Catalina" macOS_release_name="Catalina"
CFBundleShortVersionString="10.15" CFBundleShortVersionString="10.15"
sucatalog="${Catalina_sucatalog}" sucatalog="${Catalina_sucatalog}"
if [[ ! ( "${vbox_version:0:3}" =~ ^6\.1 && "${vbox_version:4:1}" -ge 4 ) ]]; then if [[ ! ( "${vbox_version:0:1}" -gt 6 || \
if [[ ! "${vbox_version:0:1}" -gt 6 || ( "${vbox_version:0:1}" = 6 && ! "${vbox_version:2:1}" -ge 2 ) ]]; then "${vbox_version}" =~ ^6\.1\.[4-9] || \
"${vbox_version}" =~ ^6\.1\.[123][0-9] || \
"${vbox_version}" =~ ^6\.[2-9] ) ]]; then
echo "" echo ""
echo "macOS Catalina requires VirtualBox version 6.1.4 or higher." echo "macOS Catalina requires VirtualBox version 6.1.4 or higher."
echo "Exiting." echo "Exiting."
exit exit
fi fi
fi
elif [[ "${macOS_release_name:0:1}" =~ [Hh] ]]; then elif [[ "${macOS_release_name:0:1}" =~ [Hh] ]]; then
macOS_release_name="HighSierra" macOS_release_name="HighSierra"
CFBundleShortVersionString="10.13" CFBundleShortVersionString="10.13"