Fix issues with 0

This commit is contained in:
Dylan 2016-04-29 10:14:55 +10:00
parent 11d80dd284
commit 1c78fb1343
1 changed files with 7 additions and 7 deletions

View File

@ -592,20 +592,20 @@ getuptime () {
case "$minutes" in case "$minutes" in
1) minutes="1 minute" ;; 1) minutes="1 minute" ;;
0) ;; 0) unset minutes ;;
*) minutes="$minutes minutes" ;; *) minutes="$minutes minutes" ;;
esac esac
case "$hours" in case "$hours" in
1) hours="1 hour" ;; 1) hours="1 hour," ;;
0) ;; 0) unset hours ;;
*) hours="$hours hours" ;; *) hours="$hours hours," ;;
esac esac
case "$days" in case "$days" in
1) days="1 day" ;; 1) days="1 day," ;;
0) ;; 0) unset days;;
*) days="$days days" ;; *) days="$days days," ;;
esac esac
uptime="up $days, $hours, $minutes" uptime="up $days, $hours, $minutes"