From 9a3a3bc83da98b70f2c532f0f22bd1eaed126d0f Mon Sep 17 00:00:00 2001 From: Dylan Date: Tue, 9 Feb 2016 09:02:07 +1100 Subject: [PATCH] Really fix openSUSE uptime command --- fetch | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fetch b/fetch index 4369cc1e..6bc3ec22 100755 --- a/fetch +++ b/fetch @@ -501,11 +501,16 @@ getuptime () { case "$os" in "Linux") case "$distro" in - "Puppy Linux"* | "Quirky Werewolf"* | "Precise Puppy"* | "openSUSE"*) + "Puppy Linux"* | "Quirky Werewolf"* | "Precise Puppy"*) uptime=$(uptime | awk -F ':[0-9]{2}+ |(, ){1}+' '{printf $2}') uptime=${uptime/ / } ;; + "openSUSE"*) + uptime=$(uptime | awk -F ':[0-9]{2}+[a-z][a-z] |(, ){1}+' '{printf $2}') + uptime=${uptime/ / } + ;; + *) uptime="$(uptime -p)" ;;