Skip to content

Commit

Permalink
readme: fix bug regarding timeframe variables
Browse files Browse the repository at this point in the history
  • Loading branch information
jarelllama authored Dec 26, 2024
1 parent d6c132f commit 7ff0b6b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/update_readme.sh
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ EOF
readonly FUNCTION='bash scripts/tools.sh'
readonly SOURCE_LOG='config/source_log.csv'
readonly DOMAIN_LOG='config/domain_log.csv'
readonly TODAY THIS_MONTH
readonly TODAY
readonly THIS_MONTH
TODAY="$(TZ=Asia/Singapore date +"%d-%m-%y")"
THIS_MONTH="$(TZ=Asia/Singapore date +"%m-%y")"

Expand All @@ -166,7 +167,8 @@ print_stats() {

printf "%5s |%8s |%7s %% |%8s %% | %s" \
"$(sum "$TODAY" "$1")" "$this_month" \
"$(( this_month * 100 / total_this_month ))" "$(sum_excluded "$1" )" "${1:-All sources}"
"$(( this_month * 100 / total_this_month ))" \
"$(sum_excluded "$1" )" "${1:-All sources}"
}

# Note that csvkit is used in the following functions as the Google Search
Expand Down

0 comments on commit 7ff0b6b

Please sign in to comment.