diff --git a/macos-guest-virtualbox.sh b/macos-guest-virtualbox.sh index ddd9308..988db6e 100755 --- a/macos-guest-virtualbox.sh +++ b/macos-guest-virtualbox.sh @@ -108,8 +108,8 @@ if [[ -n "${BASH_VERSION}" && -n "${ZSH_VERSION}" ]]; then exit elif [[ -n "${BASH_VERSION}" ]]; then if [[ ! ( "${BASH_VERSION:0:1}" -ge 5 - || "${BASH_VERSION:0:3}" =~ 4\.[3-9] - || "${BASH_VERSION:0:4}" =~ 4\.[12][0-9] ) ]]; then + || "${BASH_VERSION:0:3}" =~ 4\.[3-9] + || "${BASH_VERSION:0:4}" =~ 4\.[12][0-9] ) ]]; then echo "Please execute this script with Bash 4.3 or higher, or zsh 5.5 or higher." if [[ -n "$(sw_vers 2>/dev/null)" ]]; then echo "macOS detected. Make sure the script is not executed with" @@ -119,10 +119,10 @@ elif [[ -n "${BASH_VERSION}" ]]; then fi elif [[ -n "${ZSH_VERSION}" ]]; then if [[ ( "${ZSH_VERSION:0:1}" -ge 6 - || "${ZSH_VERSION:0:3}" =~ 5\.[5-9] - || "${ZSH_VERSION:0:4}" =~ 5\.[1-4][0-9] ) ]]; then - # make zsh parse the script (almost) like bash - setopt extendedglob sh_word_split ksh_arrays posix_argzero nullglob bsd_echo + || "${ZSH_VERSION:0:3}" =~ 5\.[5-9] + || "${ZSH_VERSION:0:4}" =~ 5\.[1-4][0-9] ) ]]; then + # make zsh parse the script (almost) like bash + setopt extendedglob sh_word_split ksh_arrays posix_argzero nullglob bsd_echo else echo "Please execute this script with zsh version 5.5 or higher." exit