From c034067573cfe7125a4714e8e3022840bb925b5f Mon Sep 17 00:00:00 2001 From: dylan araps Date: Mon, 4 Jan 2016 09:25:30 +1100 Subject: [PATCH] The get* functions now fallback to 'Unknown' instead of printing nothing --- fetch.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/fetch.sh b/fetch.sh index 01f8bfdf..abe4052c 100755 --- a/fetch.sh +++ b/fetch.sh @@ -212,6 +212,10 @@ getdistro () { "OpenBSD") distro="OpenBSD" ;; + + *) + distro="Unknown" + ;; esac } @@ -242,6 +246,10 @@ getuptime () { uptime=${uptime# } uptime="${uptime# * up }" ;; + + *) + uptime="Unknown" + ;; esac } @@ -285,7 +293,9 @@ getpackages () { packages=$(pkg_info | wc -l) ;; - *) packages="Unknown" ;; + *) + packages="Unknown" + ;; esac }