From a50857fa04af6cc32278f593c96ed83620428f97 Mon Sep 17 00:00:00 2001 From: My Spaghetti <31696646+myspaghetti@users.noreply.github.com> Date: Wed, 8 Jul 2020 16:24:37 +0300 Subject: [PATCH] xxd V1.11 --- README.md | 2 +- macos-guest-virtualbox.sh | 17 +++++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index a1591bd..c31fbdb 100644 --- a/README.md +++ b/README.md @@ -63,5 +63,5 @@ All the dependencies should be available through a package manager: * [VirtualBox](https://www.virtualbox.org/wiki/Downloads) ≥ 6.1.6 with Extension Pack, though versions as low as 5.2 may work. * GNU `Bash` ≥ 4.3, on Windows run through [Cygwin](https://cygwin.com/install.html) or WSL - see [NEM](#virtualbox-native-execution-manager-nem) -* GNU `coreutils` ≥ 8.22, GNU `gzip` ≥ 1.5, Info-ZIP `unzip` ≥ v6.0, GNU `wget` ≥ 1.14, `xxd` ≥ 1.10 +* GNU `coreutils` ≥ 8.22, GNU `gzip` ≥ 1.5, Info-ZIP `unzip` ≥ v6.0, GNU `wget` ≥ 1.14, `xxd` ≥ 1.11 * `dmg2img` ≥ 1.6.5, on Cygwin the package is not available through the package manager so the script downloads it automatically. diff --git a/macos-guest-virtualbox.sh b/macos-guest-virtualbox.sh index a7e27db..8ffb62c 100755 --- a/macos-guest-virtualbox.sh +++ b/macos-guest-virtualbox.sh @@ -2,14 +2,14 @@ # Push-button installer of macOS on VirtualBox # (c) myspaghetti, licensed under GPL2.0 or higher # url: https://github.com/myspaghetti/macos-virtualbox -# version 0.94.2 +# version 0.94.3 # Dependencies: bash coreutils gzip unzip wget xxd dmg2img # Supported versions: # VirtualBox with Extension Pack >= 6.1.6 # GNU bash >= 4.3, GNU coreutils >= 8.22, # GNU gzip >= 1.5, GNU wget >= 1.14, -# Info-ZIP unzip >= 6.0, xxd >= 1.10, +# Info-ZIP unzip >= 6.0, xxd >= 1.11, # dmg2img >= 1.6.5 function set_variables() { @@ -185,14 +185,19 @@ if [[ -n "$(sw_vers 2>/dev/null)" ]]; then fi # check for xxd, gzip, unzip, coreutils, wget -if [[ -z "$(echo "xxd" | xxd -p 2>/dev/null)" || +if [[ -z "$(echo -n "xxd" | xxd -e -p 2>/dev/null)" || -z "$(gzip --help 2>/dev/null)" || -z "$(unzip -hh 2>/dev/null)" || -z "$(csplit --help 2>/dev/null)" || -z "$(wget --version 2>/dev/null)" ]]; then - echo "Please make sure the following packages are installed:" - echo "coreutils gzip unzip xxd wget" - echo "Please make sure the coreutils and gzip packages are the GNU variant." + echo "Please make sure the following packages are installed" + echo -e "and that they are of the version specified or newer:\n" + echo " coreutils 8.22 wget 1.14 gzip 1.5 unzip 6.0 xxd 1.11" + echo -e "\nPlease make sure the coreutils and gzip packages are the GNU variant." + if [[ -z "$(echo -n "xxd" | xxd -e -p 2>/dev/null))" ]]; then + echo -e "\nMost xxd V1.11 binaries print their version as V1.10 or V1.7." + echo "The package vim-common-8 and newer provides the correct version." + fi exit fi