From ea9378a3e72637e3b80a85260859ca954ae6bc5c Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Sun, 17 Dec 2023 11:43:19 -0500 Subject: [PATCH] test --- common/functions.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/common/functions.sh b/common/functions.sh index 977b1ab..fe21519 100644 --- a/common/functions.sh +++ b/common/functions.sh @@ -74,12 +74,15 @@ pkgmgr_update(){ get_system_used_space() { usedspace=$(df --output=used -B1 / | tail -n 1| cut -d'%' -f1) + printf "$COL_RED" "$usedspace" + echo $usedspace } human_readable_bytes() { - spacekb=`expr $1 / 1024` - spacemb=`expr $1 / 1024 / 1024` - spacegb=`expr $1 / 1024 / 1024 / 1024` + local spacebytes="$1" + spacekb=`expr "$spacebytes" / 1024` + spacemb=`expr "$spacebytes" / 1024 / 1024` + spacegb=`expr "$spacebytes" / 1024 / 1024 / 1024` if [[ "$spacegb" -gt 0 ]] then