From 48d4a23aa073a22161d4b37eb0f6eb103dee68d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domen=20Ko=C5=BEar?= Date: Tue, 24 Jan 2017 19:59:55 +0100 Subject: [PATCH] bail out if macOS 10.9 or lower is used during installer --- scripts/install-nix-from-closure.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/install-nix-from-closure.sh b/scripts/install-nix-from-closure.sh index 1b4d92632..d4eb1c6fb 100644 --- a/scripts/install-nix-from-closure.sh +++ b/scripts/install-nix-from-closure.sh @@ -7,6 +7,13 @@ self="$(dirname "$0")" nix="@nix@" cacert="@cacert@" + +# macOS support for 10.10 or higher +if [[ "$(uname -s)" = "Darwin" && $(($(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" + exit 1 +fi + if ! [ -e "$self/.reginfo" ]; then echo "$0: incomplete installer (.reginfo is missing)" >&2 exit 1