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
1 changed files with 11 additions and 11 deletions

View File

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