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 29, 2024
1 parent ec7bbfa commit af7e05f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions aws/aws_s3_sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ help_usage "$@"

min_args 2 "$@"

log="aws_s3_sync-$(date '+%F_%H.%M.%S').log"

sources_file="$1"
destinations_file="$2"
shift || :
Expand Down Expand Up @@ -91,8 +93,8 @@ if ! [ -f "$sources_file" ]; then
die "File not found: $sources_file"
fi

# capture run to log file using braces to tee
#{
timestamp "Capturing log to: $log"
{

timestamp "Loading sources from file '$sources_file'"
while IFS= read -r line; do
Expand Down Expand Up @@ -150,5 +152,5 @@ 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"
} 2>&1 |
tee -a "$log"

0 comments on commit af7e05f

Please sign in to comment.