Merge pull request #1199 from NixOS/osx-minimal-version

Bail out if MacOS 10.9 or lower is used during installer
This commit is contained in:
Domen Kožar 2017-01-25 07:29:31 +01:00 committed by GitHub
commit 00928c8bc9

View file

@ -7,6 +7,13 @@ self="$(dirname "$0")"
nix="@nix@" nix="@nix@"
cacert="@cacert@" 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 if ! [ -e "$self/.reginfo" ]; then
echo "$0: incomplete installer (.reginfo is missing)" >&2 echo "$0: incomplete installer (.reginfo is missing)" >&2
exit 1 exit 1