Skip to content

Commit

Permalink
added a graceful exit when there are no draws to complete (#608)
Browse files Browse the repository at this point in the history
  • Loading branch information
CluEleSsUK authored Nov 8, 2023
1 parent 17463e5 commit 406602e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions recipients_selection/draw.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ $(cd ./draws && find . -type f | sort > "$draw_file")
# we compare the contents to find files that exist as lists but not as draws
remaining_draw_filenames=$(comm -3 "$list_file" "$draw_file" | awk '{print $1}')

if [ -z "$remaining_draw_filenames" ]; then
echo "no draws to execute"
exit 0
fi

# we then actually run the draw
while IFS= read -r filename; do
# first we strip any leading ./
Expand Down

0 comments on commit 406602e

Please sign in to comment.