commit 04e8cf6a72892a94161296dc996abdc287d66427 parent 28e45da662f3bb086e77cce9fb6b6923b7a10000 Author: Byron Torres <b@torresjrjr> Date: Thu, 24 Feb 2022 23:10:26 +0000 Fix _uptime() units order Diffstat:
M | fetch | | | 4 | ++-- |
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fetch b/fetch @@ -52,8 +52,8 @@ _os() { _uptime() { [ -r /proc/uptime ] && { s=$(cat /proc/uptime) s=${s%%.*} - days=$(($s / 86400)) mins=$(($s / 3600 % 24)) hours=$(($s / 60 % 60)) - env printf "$1" "${days}d ${mins}m ${hours}h (${s}s)" + days=$(($s / 86400)) hours=$(($s / 3600 % 24)) mins=$(($s / 60 % 60)) + env printf "$1" "${days}d ${hours}h ${mins}m (${s}s)" } || { env printf "$1" "$(uptime --pretty 2>&- || uptime)" }