Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jarelllama authored Apr 1, 2024
1 parent 246506a commit 9bc95a1
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion functions/retrieve_domains.sh
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ build() {
# Exit if no new domains to add
if ! grep -q '[a-z]' retrieved_domains.tmp; then
printf "\n\e[1mNo new domains to add.\e[0m\n"
exit 0
decide_exit
fi

format_file retrieved_domains.tmp
Expand Down Expand Up @@ -239,10 +239,18 @@ build() {
# Add updated logs
printf "%s\n%s\n" "$temp_source_log" "$rows" > "$SOURCE_LOG"

decide_exit
}

# Function 'decide_error' checks if the script should exit with an
# exit status of 1 or 0.
decide_exit() {
# Exit with error if domains need to be manually reviewed
if [[ -f manual_review.tmp ]]; then
printf "\n"
exit 1
else
exit 0
fi
}

Expand Down

0 comments on commit 9bc95a1

Please sign in to comment.