From 6d74f6fe91efaea795b37ab91f685abda8fbe041 Mon Sep 17 00:00:00 2001 From: Mayank Kumar Date: Thu, 10 Sep 2020 00:51:11 -0700 Subject: [PATCH] Update macOS version checks to support macOS 11 --- purge-nvda.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/purge-nvda.sh b/purge-nvda.sh index 4ceda95..dc23e87 100755 --- a/purge-nvda.sh +++ b/purge-nvda.sh @@ -3,7 +3,7 @@ # purge-nvda.sh # Author(s): Mayank Kumar (mayankk2308, github.com / mac_editor, egpu.io) # License: Specified in LICENSE.md. -# Version: 3.0.6 +# Version: 3.0.7 # ----- COMMAND LINE ARGS @@ -27,7 +27,7 @@ BIN_CALL=0 SCRIPT_FILE="" # Script version -SCRIPT_MAJOR_VER="3" && SCRIPT_MINOR_VER="0" && SCRIPT_PATCH_VER="6" +SCRIPT_MAJOR_VER="3" && SCRIPT_MINOR_VER="0" && SCRIPT_PATCH_VER="7" SCRIPT_VER="${SCRIPT_MAJOR_VER}.${SCRIPT_MINOR_VER}.${SCRIPT_PATCH_VER}" # User input @@ -147,9 +147,10 @@ check_sip() { # macOS Version check check_macos_version() { + MACOS_LEAP_VER="$(echo -e "${MACOS_VER}" | cut -d '.' -f1)" MACOS_MAJOR_VER="$(echo -e "${MACOS_VER}" | cut -d '.' -f2)" MACOS_MINOR_VER="$(echo -e "${MACOS_VER}" | cut -d '.' -f3)" - [[ ("${MACOS_MAJOR_VER}" < 13) || ("${MACOS_MAJOR_VER}" == 13 && "${MACOS_MINOR_VER}" < 4) ]] && echo -e "\n${BOLD}macOS 10.13.4 or later${NORMAL} required.\n" && exit $MACOS_VER_ERR + [[ ${MACOS_LEAP_VER} == "10" && ("${MACOS_MAJOR_VER}" < 13) || ("${MACOS_MAJOR_VER}" == 13 && "${MACOS_MINOR_VER}" < 4) ]] && echo -e "\n${BOLD}macOS 10.13.4 or later${NORMAL} required.\n" && exit $MACOS_VER_ERR } # Check patch status