warning about default macOS /bin/bash version

This commit is contained in:
Jack
2019-11-26 18:20:34 +02:00
committed by GitHub
parent 824e9bbbb9
commit 97a848a8fd
+7 -3
View File
@@ -2,7 +2,7 @@
# Semi-automatic installer of macOS on VirtualBox # Semi-automatic 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.76.2 # version 0.76.3
# Requirements: 40GB available storage on host # Requirements: 40GB available storage on host
# Dependencies: bash >= 4.0, unzip, wget, dmg2img, # Dependencies: bash >= 4.0, unzip, wget, dmg2img,
@@ -124,7 +124,11 @@ if [ -z "${BASH_VERSION}" ]; then
echo "Can't determine BASH_VERSION. Exiting." echo "Can't determine BASH_VERSION. Exiting."
exit exit
elif [ "${BASH_VERSION:0:1}" -lt 4 ]; then 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.0 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 exit
fi fi
} }
@@ -145,7 +149,7 @@ if [ -n "$(sw_vers 2>/dev/null)" ]; then
echo "Please make sure the following packages are installed and that" echo "Please make sure the following packages are installed and that"
echo "their path is in the PATH variable:" echo "their path is in the PATH variable:"
printf "${white_on_black}"'bash coreutils wget unzip dmg2img'"${default_color}"'\n' printf "${white_on_black}"'bash coreutils wget unzip dmg2img'"${default_color}"'\n'
echo "Please make sure bash and coreutils are the GNU variant." echo "Please make sure Bash and coreutils are the GNU variant."
exit exit
fi fi
fi fi