diff --git a/fetch.sh b/fetch.sh index 32894f68..06c13a52 100755 --- a/fetch.sh +++ b/fetch.sh @@ -192,6 +192,10 @@ case "$(uname)" in "Darwin") os="Mac OS X" ;; + + "OpenBSD") + os="OpenBSD" + ;; esac # Get Title @@ -212,6 +216,12 @@ getuptime () { uptime="Unknown" ;; + "OpenBSD") + uptime=$(uptime | awk -F, '{ print $1 }') + uptime=${uptime# } + uptime="${uptime# * up }" + ;; + *) uptime="$(uptime -p)" ;; esac } @@ -252,6 +262,10 @@ getpackages () { packages=${packages//[[:blank:]]/} ;; + "OpenBSD") + packages=$(pkg_info | wc -l) + ;; + *) packages="Unknown" ;; esac }