mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-12-23 20:12:31 +00:00
Fix bug with 0 amount
This commit is contained in:
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"
|
||||
|
||||
Reference in New Issue
Block a user