Skip to content

Commit

Permalink
Back to basics, let's leave the "grab first match" part for later.
Browse files Browse the repository at this point in the history
  • Loading branch information
airuleguy committed Jun 12, 2020
1 parent 58f0884 commit 84c27d4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ aws_access_key_id = ${AWS_ACCESS_KEY_ID}
aws_secret_access_key = ${AWS_SECRET_ACCESS_KEY}" > ~/.aws/credentials

# Coalesce filename if there are wildcards in it (grabs first match).
COALESCED_FILE=$(find ${SOURCE_PATH} -name "${FILE}" -type f -exec basename '{}' ';' | head -1)
COALESCED_FILE=$(find ${SOURCE_PATH} -name "${FILE}" -type f -exec basename '{}' ';')

echo "Coalesced file is: $COALESCED_FILE"

(aws s3 ls s3://${AWS_S3_BUCKET}${DESTINATION_KEY}"$COALESCED_FILE") && \
rm -rf ~/.aws && \
Expand Down

0 comments on commit 84c27d4

Please sign in to comment.