mirror of
https://github.com/tuna/tunasync-scripts.git
synced 2025-04-19 11:42:43 +00:00
Closes https://github.com/tuna/issues/issues/1593 Ref to https://github.com/aws/aws-cli/issues/3415
13 lines
460 B
Bash
Executable File
13 lines
460 B
Bash
Executable File
#!/bin/bash
|
|
|
|
if [[ ! -z "${TUNASYNC_S3_ENDPOINT}" ]]; then
|
|
ENDPOINT="--endpoint-url=${TUNASYNC_S3_ENDPOINT}"
|
|
else
|
|
ENDPOINT=""
|
|
fi
|
|
|
|
[[ ! -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}"
|
|
|