Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
jarelllama authored Apr 2, 2024
1 parent 0c7ff16 commit 7f2d2f5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 2 additions & 3 deletions functions/test_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -657,9 +657,8 @@ check_terms() {
fi
done < "$2"

if [[ "$term_error" != true ]]; then
return 0
fi
# Return if all terms found
[[ "$term_error" != true ]] && return

printf "\e[1m[warn] %s is not as expected:\e[0m\n" "$3"
cat "$1"
Expand Down
4 changes: 3 additions & 1 deletion functions/validate_raw.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ validate_raw() {
# Remove common subdomains
domains_with_subdomains_count=0
while read -r subdomain; do # Loop through common subdomains
# Find domains and skip to next subdomain if none found
domains_with_subdomains="$(grep "^${subdomain}\." <<< "$domains")" \
|| continue

Expand Down Expand Up @@ -78,7 +79,8 @@ validate_raw() {
# Remove redundant domains
redundant_count=0
while read -r domain; do # Loop through each domain in the blocklist
# Find redundant domains via wildcard matching
# Find redundant domains via wildcard matching and skip to
# next wildcard if none found
redundant_domains="$(grep "\.${domain}$" <<< "$domains")" \
|| continue

Expand Down

0 comments on commit 7f2d2f5

Please sign in to comment.