added macOS support for model name

This commit is contained in:
Andrew Titmuss 2016-08-14 14:01:31 +10:00
parent 6b9abdb9d6
commit 8d2db93545
No known key found for this signature in database
GPG Key ID: 8AF42975C787E0B2
1 changed files with 5 additions and 0 deletions

View File

@ -82,6 +82,11 @@ getmodel() {
"ipod7,1") model="iPod touch 6G" ;;
esac
;;
"Mac OS X")
model="$(sysctl hw.model)"
model="${model//hw.model: /}"
;;
esac
}