From 68c9fb7f76b89d699b89fac679ed924a64c212b3 Mon Sep 17 00:00:00 2001 From: Jack <31696646+myspaghetti@users.noreply.github.com> Date: Mon, 13 Jan 2020 23:36:14 +0200 Subject: [PATCH] upped Bash version requirement to 4.3 upped Bash version requirement to 4.3 due to buggy associative array implementation (see [issue 147](https://github.com/myspaghetti/macos-guest-virtualbox/issues/147)) --- macos-guest-virtualbox.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/macos-guest-virtualbox.sh b/macos-guest-virtualbox.sh index 0f3f350..2b3ab27 100755 --- a/macos-guest-virtualbox.sh +++ b/macos-guest-virtualbox.sh @@ -2,10 +2,10 @@ # Semi-automatic installer of macOS on VirtualBox # (c) myspaghetti, licensed under GPL2.0 or higher # url: https://github.com/myspaghetti/macos-guest-virtualbox -# version 0.78.0 +# version 0.78.1 # Requirements: 40GB available storage on host -# Dependencies: bash >= 4.0, unzip, wget, dmg2img, +# Dependencies: bash >= 4.3, unzip, wget, dmg2img, # VirtualBox with Extension Pack >= 6.0 function set_variables() { @@ -124,12 +124,15 @@ if [ -z "${BASH_VERSION}" ]; then echo "Can't determine BASH_VERSION. Exiting." exit elif [ "${BASH_VERSION:0:1}" -lt 4 ]; then - echo "Please run this script on Bash 4.0 or higher." + echo "Please run this script on Bash 4.3 or higher." if [ -n "$(sw_vers 2>/dev/null)" ]; then echo "macOS detected. Make sure the script is not running on" echo "the default /bin/bash which is version 3." fi exit +elif [ "${BASH_VERSION:0:1}" -eq 4 -a "${BASH_VERSION:2:1}" -le 2 ]; then + echo "Please run this script on Bash 4.3 or higher." + exit fi }