From 9268d9c70b81674e230ff40baa663ea3c579d350 Mon Sep 17 00:00:00 2001 From: Jack <31696646+myspaghetti@users.noreply.github.com> Date: Thu, 9 Jan 2020 10:31:18 +0200 Subject: [PATCH] added g prefix for MacPorts GNU coreutils --- macos-guest-virtualbox.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/macos-guest-virtualbox.sh b/macos-guest-virtualbox.sh index 3cc643c..6005bd2 100755 --- a/macos-guest-virtualbox.sh +++ b/macos-guest-virtualbox.sh @@ -2,7 +2,7 @@ # 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.77.3 +# version 0.77.4 # Requirements: 40GB available storage on host # Dependencies: bash >= 4.0, unzip, wget, dmg2img, @@ -143,7 +143,17 @@ if [ -n "$(sw_vers 2>/dev/null)" ]; then PATH="${homebrew_gnubin}:${PATH}" fi # if csplit isn't GNU variant, exit - if [ -z "$(csplit --help 2>/dev/null)" ]; then + if [ -n "$(gcsplit --help 2>/dev/null)" ]; then + function csplit() { + gcsplit "$@" + } + function tac() { + gtac "$@" + } + function split() { + gsplit"$@" + } + elif [ -z "$(csplit --help 2>/dev/null)" ]; then echo "" printf 'macOS detected.\nPlease use a package manager such as '"${white_on_black}"'homebrew'"${default_color}"', '"${white_on_black}"'pkgsrc'"${default_color}"', '"${white_on_black}"'nix'"${default_color}"', or '"${white_on_black}"'MacPorts'"${default_color}"'.\n' echo "Please make sure the following packages are installed and that"