From 2136f0ea7804d510bc0342f34776283e8b5532d2 Mon Sep 17 00:00:00 2001 From: rokibhasansagar <10854164+rokibhasansagar@users.noreply.github.com> Date: Sat, 25 Feb 2023 18:32:12 +0600 Subject: [PATCH] [Cosmetic Update] Reduce Countdown Timer - Just 2 Seconds Wait Time Is Given Instead Of 10, No Change In Codes [skip ci] - [HEADS UP] Massive Update Coming In Next Month After A Looong Time, Hurrah :) Cleanup Function With Custom Retention Parameter Is Being Reworked Signed-off-by: rokibhasansagar <10854164+rokibhasansagar@users.noreply.github.com> --- cleanup.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cleanup.sh b/cleanup.sh index 984264b..95b441b 100755 --- a/cleanup.sh +++ b/cleanup.sh @@ -8,13 +8,13 @@ fi # Make Sure The Environment Is Non-Interactive export DEBIAN_FRONTEND=noninteractive -# Prepare: Just To Populate Workflow Output Window -until [[ "${SECONDS_LEFT:=10}" = 0 ]]; do - printf "Please wait %ss ...\n" "${SECONDS_LEFT}" - sleep 0.5 - SECONDS_LEFT=$(echo "${SECONDS_LEFT} - 0.5" | bc) +# 2 Second Echo, Just To Populate Workflow Output Window +until [[ "${SECONDS_LEFT:=2.00}" == 0.00 ]]; do + printf "\rPlease wait %ss ..." "${SECONDS_LEFT}" + sleep 0.2498 + SECONDS_LEFT=$(printf %.2f $(echo "${SECONDS_LEFT} - 0.25" | bc)) done -unset SECONDS_LEFT +unset SECONDS_LEFT && printf "\n" echo "::group::Disk Space Before Cleanup" df -hlT /