Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
jarelllama authored Apr 1, 2024
1 parent 21592d7 commit d3bcf7e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions functions/check_parked.sh
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ format_file() {
}

cleanup() {
find . -maxdepth 1 -type f -name "*.tmp" -delete
find . -maxdepth 1 -type f -name "x??" -delete
find . -maxdepth 1 -type f -name '*.tmp' -delete
find . -maxdepth 1 -type f -name 'x??' -delete

# Prune old entries from parked domains file
if (( $(wc -l < "$PARKED_DOMAINS") > 4000 )); then
Expand Down
11 changes: 6 additions & 5 deletions functions/retrieve_domains.sh
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,9 @@ build() {
# Mark sources as saved in the source log file
rows="$(sed 's/,no/,yes/' <(grep -F "$TIME_FORMAT" "$SOURCE_LOG"))"
# Remove previous logs
temp_SOURCE_LOG="$(grep -vF "$TIME_FORMAT" "$SOURCE_LOG")"
temp_source_log="$(grep -vF "$TIME_FORMAT" "$SOURCE_LOG")"
# Add updated logs
printf "%s\n%s\n" "$temp_SOURCE_LOG" "$rows" > "$SOURCE_LOG"
printf "%s\n%s\n" "$temp_source_log" "$rows" > "$SOURCE_LOG"

# Exit with error if domains need to be manually reviewed
if [[ -f manual_review.tmp ]]; then
Expand Down Expand Up @@ -284,10 +284,10 @@ format_file() {
}

cleanup() {
# Initialize pending directory is no pending domains to be saved
# Initialize pending directory if no pending domains to be saved
find data/pending -type d -empty -delete

find . -maxdepth 1 -type f -name "*.tmp" -delete
find . -maxdepth 1 -type f -name '*.tmp' -delete
}

# Source functions are to retrieve results from the respective sources.
Expand All @@ -303,7 +303,8 @@ cleanup() {
# $results_file (if results retrieved)

source_google_search() {
command -v csvgrep &> /dev/null || pip install -q csvkit # Install csvkit
# Install csvkit
command -v csvgrep &> /dev/null || pip install -q csvkit

local source='Google Search'
local results_file
Expand Down
2 changes: 1 addition & 1 deletion functions/update_readme.sh
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ count_excluded() {

# Entry point

trap 'find . -maxdepth 1 -type f -name "*.tmp" -delete' EXIT
trap 'find . -maxdepth 1 -type f -name '*.tmp' -delete' EXIT

command -v csvgrep &> /dev/null || pip install -q csvkit # Install csvkit

Expand Down
2 changes: 1 addition & 1 deletion functions/validate_raw.sh
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ format_file() {

# Entry point

trap 'find . -maxdepth 1 -type f -name "*.tmp" -delete' EXIT
trap 'find . -maxdepth 1 -type f -name '*.tmp' -delete' EXIT

# Add new wildcards to the raw files
cat "$WILDCARDS" >> "$RAW"
Expand Down

0 comments on commit d3bcf7e

Please sign in to comment.