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" }