Improve versions for macOS

This commit is contained in:
Michael Boelen 2016-10-26 12:19:01 +02:00
parent 9c6864589b
commit 3a69103a0e
1 changed files with 5 additions and 4 deletions

View File

@ -44,11 +44,12 @@
OS_NAME=$(/usr/bin/sw_vers -productName)
OS_VERSION=$(/usr/bin/sw_vers -productVersion)
OS_VERSION_NAME="unknown"
OS_FULLNAME="macOS (unknown version)"
case ${OS_VERSION} in
10.9) OS_FULLNAME="Mac OS X 10.9 (Mavericks)" ;;
10.10) OS_FULLNAME="Mac OS X 10.10 (Yosemite)" ;;
10.11) OS_FULLNAME="Mac OS X 10.11 (El Capitan)" ;;
"10.12" | "10.12.[0-9]") OS_NAME="macOS"; OS_FULLNAME="macOS Sierra (${OS_VERSION})" ;;
10.9 | 10.9.[0-9]*) OS_FULLNAME="Mac OS X 10.9 (Mavericks)" ;;
10.10 | 10.10.[0-9]*) OS_FULLNAME="Mac OS X 10.10 (Yosemite)" ;;
10.11 | 10.11.[0-9]*) OS_FULLNAME="Mac OS X 10.11 (El Capitan)" ;;
10.12 | 10.12.[0-9]*) OS_NAME="macOS"; OS_FULLNAME="macOS Sierra (${OS_VERSION})" ;;
*) echo "Unknown macOS version. Do you know what version it is? Create an issue at ${PROGRAM_SOURCE}" ;;
esac
else