Fix bug with 0 amount
This commit is contained in:
parent
eefca64248
commit
1c8b71fb90
1 changed files with 6 additions and 6 deletions
12
neofetch
12
neofetch
|
@ -587,21 +587,21 @@ getuptime () {
|
|||
|
||||
# Format the output like Linux's "uptime -p" cmd.
|
||||
if [ "$mins" == 1 ]; then
|
||||
mins+=" minute"
|
||||
mins="$mins minute"
|
||||
elif [ "$mins" != 0 ]; then
|
||||
mins+=" minutes"
|
||||
mins="$mins minutes"
|
||||
fi
|
||||
|
||||
if [ "$hours" == 1 ]; then
|
||||
hours+=" hour,"
|
||||
hours="$hours hour,"
|
||||
elif [ "$mins" != 0 ]; then
|
||||
hours+=" hours,"
|
||||
hours="$hours hours,"
|
||||
fi
|
||||
|
||||
if [ "$days" == 1 ]; then
|
||||
days+=" day,"
|
||||
days="$days day,"
|
||||
elif [ "$days" != 0 ]; then
|
||||
days+=" days,"
|
||||
days="$days days,"
|
||||
fi
|
||||
|
||||
uptime="up $days $hours $mins"
|
||||
|
|
Loading…
Reference in a new issue