Merge Windows and Linux uptime blocks since they're the same

This commit is contained in:
Dylan 2016-03-26 22:46:07 +11:00
parent 3584ebcf76
commit 95c744f0f8
1 changed files with 2 additions and 7 deletions

View File

@ -554,9 +554,9 @@ getkernel() {
getuptime () { getuptime () {
case "$os" in case "$os" in
"Linux") "Linux" | "Windows")
case "$distro" in case "$distro" in
"Puppy Linux"* | "Quirky Werewolf"* | "Precise Puppy"* | "Alpine Linux"*) *"Puppy"* | "Quirky Werewolf"* | "Alpine Linux"* | "Windows"*)
uptime=$(uptime | awk -F ':[0-9]{2}+ |(, ){1}+' '{printf $2}') uptime=$(uptime | awk -F ':[0-9]{2}+ |(, ){1}+' '{printf $2}')
uptime=${uptime/ / } uptime=${uptime/ / }
;; ;;
@ -610,11 +610,6 @@ getuptime () {
uptime="up $uptime" uptime="up $uptime"
;; ;;
"Windows")
uptime=$(uptime | awk -F ':[0-9]{2}+ |(, ){1}+' '{printf $2}')
uptime=${uptime/ / }
;;
*) *)
uptime="Unknown" uptime="Unknown"
;; ;;