v1.2.1 = Fixed issue improperly processing 10.10.x OS version strings.

+ Fixed issue improperly processing 10.10.x OS version strings.
This commit is contained in:
Zack T
2018-01-10 14:56:14 -07:00
parent db689476b8
commit a3a2c5c2bf

View File

@@ -3,7 +3,7 @@
###################################################################################################
# Script Name: jamf_ea_LatestOSSupported.sh
# By: Zack Thompson / Created: 9/26/2017
# Version: 1.2 / Updated: 11/13/2017 / By: ZT
# Version: 1.2.1 / Updated: 1/10/2018 / By: ZT
#
# Description: A Jamf Extension Attribute to check the latest compatible version of macOS.
#
@@ -44,7 +44,7 @@ function modelCheck {
# Get machine info
# Get the OS Version
osVersion=$(sw_vers -productVersion | /usr/bin/awk -F '10.' '{print $2}')
osVersion=$(sw_vers -productVersion | /usr/bin/awk -F '.' '{print $2"."$3}')
# Get the Model Type and Major Version
modelType=$(/usr/sbin/sysctl -n hw.model | /usr/bin/sed 's/[^a-zA-Z]//g')
modelMajorVersion=$(/usr/sbin/sysctl -n hw.model | /usr/bin/sed 's/[^0-9,]//g' | /usr/bin/awk -F, '{print $1}')