From 84c27d46b6d04ea88acd1e7ae008a1dcf45dca4c Mon Sep 17 00:00:00 2001 From: airuleguy Date: Fri, 12 Jun 2020 12:37:49 -0300 Subject: [PATCH] Back to basics, let's leave the "grab first match" part for later. --- entrypoint.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index ebdc1ff..63ec553 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -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 && \