diff options
author | Daiderd Jordan <daiderd@gmail.com> | 2018-12-20T19·05+0100 |
---|---|---|
committer | Daiderd Jordan <daiderd@gmail.com> | 2018-12-20T19·12+0100 |
commit | 82f054d7d5fc8f9de45afa7107557644d1514c98 (patch) | |
tree | e04279c30d9da3fe5460a8c898203fcc7bbf921b /scripts/install-nix-from-closure.sh | |
parent | ff342fc0c2be662dd9791ff32b4d6d63e35aa2e9 (diff) |
installer: update macOS version check to 10.12.2
Nixpkgs will drop support for <10.12 soon and thus a nix release built using the 19.03 channel will also require a newer version of macOS.
Diffstat (limited to 'scripts/install-nix-from-closure.sh')
-rw-r--r-- | scripts/install-nix-from-closure.sh | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/install-nix-from-closure.sh b/scripts/install-nix-from-closure.sh index ab20774bbf03..e635dcab3917 100644 --- a/scripts/install-nix-from-closure.sh +++ b/scripts/install-nix-from-closure.sh @@ -22,10 +22,12 @@ if [ -z "$HOME" ]; then exit 1 fi -# macOS support for 10.10 or higher +# macOS support for 10.12.6 or higher if [ "$(uname -s)" = "Darwin" ]; then - if [ $(($(sw_vers -productVersion | cut -d '.' -f 2))) -lt 10 ]; then - echo "$0: macOS $(sw_vers -productVersion) is not supported, upgrade to 10.10 or higher" + macos_major=$(sw_vers -productVersion | cut -d '.' -f 2) + macos_minor=$(sw_vers -productVersion | cut -d '.' -f 3) + if [ "$macos_major" -lt 12 ] || ([ "$macos_major" -eq 12 ] && [ "$macos_minor" -lt 6 ]); then + echo "$0: macOS $(sw_vers -productVersion) is not supported, upgrade to 10.12.6 or higher" exit 1 fi fi |