Skip to content

Commit

Permalink
updated aws_s3_sync.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
HariSekhon committed Nov 28, 2024
1 parent d77cec1 commit ec7bbfa
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion aws/aws_s3_sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ validate_s3_url(){
if ! [ -f "$sources_file" ]; then
die "File not found: $sources_file"
fi

# capture run to log file using braces to tee
#{

timestamp "Loading sources from file '$sources_file'"
while IFS= read -r line; do
validate_s3_url "$line"
Expand Down Expand Up @@ -142,7 +146,9 @@ for ((i=0; i < sources_len; i++)); do
timestamp "Syncing AWS S3 '$src' to '$dest'"
aws s3 sync "$src" "$dest" "$@"
done

echo
# we've already verified above that $sources_len and $destination_len are the same
timestamp "AWS S3 Sync completed for $sources_len S3 URL paths"

#} 2>&1 |
#tee -a "aws_s3_sync-$(date '+%F_%H.%M.%S').log"

0 comments on commit ec7bbfa

Please sign in to comment.