diff --git a/scripts/countdown b/scripts/countdown index 513e3bc..e1c993c 100755 --- a/scripts/countdown +++ b/scripts/countdown @@ -16,14 +16,15 @@ function init_day { } if init_day; then - next_day=$(($day + 1)) + next_day=$((day + 1)) next_timestamp=$(date --date="$(date +%Y-%m)-$next_day" +%s) while true; do - secs_left=$(($next_timestamp - $(date +%s))) + secs_left=$((next_timestamp - $(date +%s))) if [ $secs_left -le 0 ]; then break fi printf "\r\x1b[K%s secs left..." "$secs_left" + sleep 0.3 done printf "\r\x1b[K" init_day