bail out if macOS 10.9 or lower is used during installer

(cherry picked from commit 48d4a23aa0)
Signed-off-by: Domen Kožar <domen@dev.si>

cc @edolstra
This commit is contained in:
Domen Kožar 2017-01-24 19:59:55 +01:00
parent 697b5755e4
commit 13fe83dc8e
No known key found for this signature in database
GPG Key ID: C2FFBCAFD2C24246
1 changed files with 6 additions and 0 deletions

View File

@ -12,6 +12,12 @@ if ! [ -e $self/.reginfo ]; then
exit 1
fi
# 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 [ -z "$USER" ]; then
echo "$0: \$USER is not set" >&2
exit 1