Add iOS detection

This commit is contained in:
Dylan 2016-05-07 20:22:39 +10:00
parent 2a423413ca
commit bf3b1c1e2e
1 changed files with 7 additions and 6 deletions

View File

@ -447,12 +447,13 @@ shopt -s nocasematch extglob
# Operating System {{{
case "$(uname)" in
"Linux") os="Linux" ;;
"Darwin") os="Mac OS X" ;;
"OpenBSD") os="OpenBSD" ;;
*"BSD") os="BSD" ;;
case "$(uname -sm)" in
"Linux"*) os="Linux" ;;
"Darwin"*) os="Mac OS X" ;;
"OpenBSD"*) os="OpenBSD" ;;
*"BSD"*) os="BSD" ;;
"CYGWIN"*) os="Windows" ;;
*"iPhone"* | *"iPad"* | *"iPod"*) os="iOS" ;;
*) printf "%s\n" "Unknown OS detected: $(uname)"; exit 1 ;;
esac