Skip to content

Commit

Permalink
Fix minor issue with macOS version check
Browse files Browse the repository at this point in the history
  • Loading branch information
mayankk2308 committed Sep 13, 2020
1 parent cfd9794 commit 97f6b47
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions set-eGPU.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# set-eGPU.sh
# Author(s): Mayank Kumar (@mac_editor, egpu.io / @mayankk2308, github.com)
# Version: 2.0.6
# Version: 2.0.7

# ----- ENVIRONMENT

Expand All @@ -24,7 +24,7 @@ BIN_CALL=0
SCRIPT_FILE=""

# Script version
SCRIPT_MAJOR_VER="2" && SCRIPT_MINOR_VER="0" && SCRIPT_PATCH_VER="6"
SCRIPT_MAJOR_VER="2" && SCRIPT_MINOR_VER="0" && SCRIPT_PATCH_VER="7"
SCRIPT_VER="${SCRIPT_MAJOR_VER}.${SCRIPT_MINOR_VER}.${SCRIPT_PATCH_VER}"
IS_HIGH_SIERRA=0
PREF_SET_ERROR=0
Expand Down Expand Up @@ -165,6 +165,7 @@ check_compatibility() {
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)"
[[ -z "${MACOS_MINOR_VER}" ]] && MACOS_MINOR_VER=0
[[ ${MACOS_LEAP_VER} == "10" && (("${MACOS_MAJOR_VER}" < 13) || ("${MACOS_MAJOR_VER}" == 13 && "${MACOS_MINOR_VER}" < 4)) ]] && echo -e "\nOnly ${BOLD}macOS 10.13.4 or later${NORMAL} compatible.\n" && exit
(( ${MACOS_LEAP_VER} == "10" && ${MACOS_MAJOR_VER} == "13" )) && IS_HIGH_SIERRA=1
}
Expand Down

0 comments on commit 97f6b47

Please sign in to comment.