From 0fbfe79b09d5d0fb29391f7678dca9950b5feca0 Mon Sep 17 00:00:00 2001 From: Jarell <91372088+jarelllama@users.noreply.github.com> Date: Mon, 1 Apr 2024 16:00:15 +0800 Subject: [PATCH] Fix --- functions/build_lists.sh | 4 ++-- functions/update_readme.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/functions/build_lists.sh b/functions/build_lists.sh index ce0c6aad3..9cd24e03a 100644 --- a/functions/build_lists.sh +++ b/functions/build_lists.sh @@ -7,7 +7,7 @@ readonly RAW_LIGHT='data/raw_light.txt' build() { # Set default comment character to '#' - comment=${comment:-'#'} + comment=${comment:-#} mkdir -p "lists/${directory}" @@ -20,7 +20,7 @@ build() { fi source_file="${source_file:-$RAW}" - blocklist_path="lists/${directory}/${list_name:-'scams.txt'}" + blocklist_path="lists/${directory}/${list_name:-scams.txt}" # Append header onto blocklist cat << EOF > "$blocklist_path" diff --git a/functions/update_readme.sh b/functions/update_readme.sh index f463ea6cc..403d2768f 100644 --- a/functions/update_readme.sh +++ b/functions/update_readme.sh @@ -139,7 +139,7 @@ EOF # for each source. # $1: source to process (default is all sources) print_stats() { - [[ -z "$1" ]] && source='All sources' || source="$1" + source="${3:-All sources}" printf "%5s |%10s |%8s%% | %s\n" \ "$(sum "$TODAY" "$1")" "$(sum "$YESTERDAY" "$1")" "$(count_excluded "$1" )" "$source" }