Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ function do_sync {
return 0
fi
CURRENT_ETAG=$FILE_ETAG
aws s3api get-object --bucket $S3_BUCKET --key $S3_KEY /tmp/out > /dev/null

aws s3api get-object --bucket $S3_BUCKET --key $S3_KEY /tmp/$S3_KEY > /dev/null

# Optionally set file permissions
if [ -n "$MODE" ]; then
chmod "$MODE" /tmp/out
chmod "$MODE" /tmp/$S3_KEY
fi

chown $OWNER_UID:$OWNER_GID /tmp/out
chown $OWNER_UID:$OWNER_GID /tmp/$S3_KEY

mv /tmp/out $DESTINATION
mv /tmp/$S3_KEY $DESTINATION
}

if [ -z "$INTERVAL" ]; then
Expand Down