Merge pull request #312 from iandrewt/sierra-fix

fixed macOS codename function
This commit is contained in:
Dylan Araps 2016-08-14 14:46:13 +10:00 committed by GitHub
commit 003d9a3138

View file

@ -63,16 +63,16 @@ getdistro() {
osx_version="$(sw_vers -productVersion)" osx_version="$(sw_vers -productVersion)"
osx_build="$(sw_vers -buildVersion)" osx_build="$(sw_vers -buildVersion)"
case "${osx_version%.*}" in case "$osx_version" in
"10.4") codename="Mac OS X Tiger" ;; "10.4"*) codename="Mac OS X Tiger" ;;
"10.5") codename="Mac OS X Leopard" ;; "10.5"*) codename="Mac OS X Leopard" ;;
"10.6") codename="Mac OS X Snow Leopard" ;; "10.6"*) codename="Mac OS X Snow Leopard" ;;
"10.7") codename="Mac OS X Lion" ;; "10.7"*) codename="Mac OS X Lion" ;;
"10.8") codename="OS X Mountain Lion" ;; "10.8"*) codename="OS X Mountain Lion" ;;
"10.9") codename="OS X Mavericks" ;; "10.9"*) codename="OS X Mavericks" ;;
"10.10") codename="OS X Yosemite" ;; "10.10"*) codename="OS X Yosemite" ;;
"10.11") codename="OS X El Capitan" ;; "10.11"*) codename="OS X El Capitan" ;;
"10.12") codename="macOS Sierra" ;; "10.12"*) codename="macOS Sierra" ;;
*) codename="Mac OS X" ;; *) codename="Mac OS X" ;;
esac esac
distro="$codename $osx_version $osx_build" distro="$codename $osx_version $osx_build"
@ -2324,7 +2324,7 @@ colors() {
setcolors 4 8 setcolors 4 8
;; ;;
*"OS X"* | *"iOS"* | "Mac") *"OS X"* | *"iOS"* | "Mac" | *"macOS"*)
setcolors 2 3 1 1 5 4 setcolors 2 3 1 1 5 4
ascii_distro="mac" ascii_distro="mac"
;; ;;