Add uptime and packages support for iOS

This commit is contained in:
Dylan 2016-05-07 20:48:47 +10:00
parent 90447980bd
commit f947031e38
1 changed files with 6 additions and 2 deletions

View File

@ -579,7 +579,7 @@ getuptime () {
esac
;;
"Mac OS X" | *"BSD")
"Mac OS X" | "iPhone OS" | *"BSD")
# Get boot time in seconds
boot="$(sysctl -n kern.boottime)"
boot="${boot/'{ sec = '}"
@ -656,7 +656,7 @@ getuptime () {
getpackages () {
case "$os" in
"Linux")
"Linux" | "iPhone OS")
type -p pacman >/dev/null 2>&1 && \
packages="$(pacman -Qq --color never | wc -l)"
@ -947,6 +947,10 @@ getcpu () {
cores=$(sysctl -n hw.ncpu)
;;
"iPhone OS")
cpu=""
;;
*)
case "$distro" in
"OpenBSD"* | "FreeBSD"*)