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 Sep 5, 2024
1 parent e09b878 commit 2fc0f80
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions aws/aws_s3_sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ help_usage "$@"
min_args 2 "$@"

sources_file="$1"
destination="$2"
destinations_file="$2"
shift || :
shift || :

Expand Down Expand Up @@ -99,14 +99,14 @@ sources_len="${#sources[@]}"
timestamp "$sources_len sources loaded"
echo

if ! [ -f "$destination" ]; then
die "File not found: $destination"
if ! [ -f "$destinations_file" ]; then
die "File not found: $destinations_file"
fi
timestamp "Loading destinations from file '$destination'"
timestamp "Loading destinations from file '$destinations_file'"
while IFS= read -r line; do
validate_s3_url "$line"
destinations+=("$line")
done < <(decomment "$destination")
done < <(decomment "$destinations_file")
destinations_len="${#destinations[@]}"
timestamp "$destinations_len destinations loaded"
echo
Expand Down

0 comments on commit 2fc0f80

Please # to comment.