Skip to content

Commit cfd9794

Browse files
committed
Update macOS version checks to support macOS 11
1 parent ce7e114 commit cfd9794

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

set-eGPU.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# set-eGPU.sh
44
# Author(s): Mayank Kumar (@mac_editor, egpu.io / @mayankk2308, github.com)
5-
# Version: 2.0.5
5+
# Version: 2.0.6
66

77
# ----- ENVIRONMENT
88

@@ -24,7 +24,7 @@ BIN_CALL=0
2424
SCRIPT_FILE=""
2525

2626
# Script version
27-
SCRIPT_MAJOR_VER="2" && SCRIPT_MINOR_VER="0" && SCRIPT_PATCH_VER="5"
27+
SCRIPT_MAJOR_VER="2" && SCRIPT_MINOR_VER="0" && SCRIPT_PATCH_VER="6"
2828
SCRIPT_VER="${SCRIPT_MAJOR_VER}.${SCRIPT_MINOR_VER}.${SCRIPT_PATCH_VER}"
2929
IS_HIGH_SIERRA=0
3030
PREF_SET_ERROR=0
@@ -162,10 +162,11 @@ check_egpu_presence() {
162162

163163
# macOS Version check
164164
check_compatibility() {
165+
MACOS_LEAP_VER="$(echo -e "${MACOS_VER}" | cut -d '.' -f1)"
165166
MACOS_MAJOR_VER="$(echo -e "${MACOS_VER}" | cut -d '.' -f2)"
166167
MACOS_MINOR_VER="$(echo -e "${MACOS_VER}" | cut -d '.' -f3)"
167-
[[ ("${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
168-
(( ${MACOS_MAJOR_VER} == 13 )) && IS_HIGH_SIERRA=1
168+
[[ ${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
169+
(( ${MACOS_LEAP_VER} == "10" && ${MACOS_MAJOR_VER} == "13" )) && IS_HIGH_SIERRA=1
169170
}
170171

171172
# ----- APPLICATION PREFERENCES MANAGER

0 commit comments

Comments
 (0)