mirror of
https://github.com/tuna/tunasync-scripts.git
synced 2025-12-25 16:32:47 +00:00
Some checks failed
docker-images / multi (., tunasync-scripts) (push) Has been cancelled
docker-images / multi (bandersnatch) (push) Has been cancelled
docker-images / multi (dockerfiles/rubygems, rubygems-mirror) (push) Has been cancelled
docker-images / multi (ftpsync) (push) Has been cancelled
docker-images / multi (nix-channels) (push) Has been cancelled
docker-images / multi (pub-mirror) (push) Has been cancelled
docker-images / multi (rustup-mirror) (push) Has been cancelled
docker-images / multi (shadowmire) (push) Has been cancelled
docker-images / multi (tsumugu) (push) Has been cancelled
Signed-off-by: Shengqi Chen <harry-chen@outlook.com>
16 lines
531 B
Bash
Executable File
16 lines
531 B
Bash
Executable File
#!/bin/bash
|
|
|
|
if [[ ! -z "${TUNASYNC_S3_ENDPOINT}" ]]; then
|
|
ENDPOINT="--endpoint-url=${TUNASYNC_S3_ENDPOINT}"
|
|
else
|
|
ENDPOINT=""
|
|
fi
|
|
|
|
# see tuna/tunasync-scripts#183
|
|
export AWS_EC2_METADATA_DISABLED=true
|
|
|
|
[[ ! -d "${TUNASYNC_WORKING_DIR}" ]] && mkdir -p "${TUNASYNC_WORKING_DIR}"
|
|
mkdir /tmp/none; cd /tmp/none # enter an empty folder, so the stars in TUNASYNC_AWS_OPTIONS are not expanded
|
|
exec aws --no-sign-request ${ENDPOINT} s3 sync --exact-timestamps ${TUNASYNC_AWS_OPTIONS} "${TUNASYNC_UPSTREAM_URL}" "${TUNASYNC_WORKING_DIR}"
|
|
|