macOS coreutils
This commit is contained in:
@@ -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/img2tab/macos-guest-virtualbox
|
# url: https://github.com/img2tab/macos-guest-virtualbox
|
||||||
# version 0.71.7
|
# version 0.72.0
|
||||||
|
|
||||||
# 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,
|
||||||
@@ -108,11 +108,13 @@ read
|
|||||||
|
|
||||||
# check dependencies
|
# check dependencies
|
||||||
function check_dependencies() {
|
function check_dependencies() {
|
||||||
# check if running on macOS
|
# check if running on macOS and non-GNU coreutils
|
||||||
if [ -n "$(sw_vers 2>/dev/null)" ]; then
|
if [ -n "$(sw_vers 2>/dev/null)" -a -z "$(csplit --help 2>/dev/null)" ]; then
|
||||||
printf '\nThis script is not completely tested on macOS hosts.\nVisit https://github.com/myspaghetti/macos-guest-virtualbox/issues/39 for more information\n'
|
printf 'macOS detected. Please use a package manager such as '"${white_on_black}"'homebrew'"${default_color}"', '"${white_on_black}"'nix'"${default_color}"', or '"${white_on_black}"'MacPorts'"${default_color}"'.\n'
|
||||||
read -p "Press enter to continue."
|
echo "Please make sure the following packages are installed and their path is in the PATH variable:"
|
||||||
export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"
|
printf "${white_on_black}"'bash coreutils wget unzip dmg2img'"${default_color}"'\n'
|
||||||
|
echo "Please make sure bash and coreutils are the GNU variant."
|
||||||
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# check Bash version
|
# check Bash version
|
||||||
@@ -126,10 +128,11 @@ fi
|
|||||||
|
|
||||||
# check for unzip, coreutils, wget
|
# check for unzip, coreutils, wget
|
||||||
if [ -z "$(unzip -hh 2>/dev/null)" \
|
if [ -z "$(unzip -hh 2>/dev/null)" \
|
||||||
-o -z "$(head --version 2>/dev/null)" \
|
-o -z "$(csplit --help 2>/dev/null)" \
|
||||||
-o -z "$(wget --version 2>/dev/null)" ]; then
|
-o -z "$(wget --version 2>/dev/null)" ]; then
|
||||||
echo "Please make sure the following packages are installed:"
|
echo "Please make sure the following packages are installed:"
|
||||||
echo "coreutils unzip wget"
|
echo "coreutils unzip wget"
|
||||||
|
echo "Please make sure coreutils is the GNU variant."
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user