Update s3.sh

This commit is contained in:
z4yx 2020-05-23 15:46:33 +08:00
parent 1681a26ea2
commit 9d1c2fc8c5

1
s3.sh
View File

@ -1,4 +1,5 @@
#!/bin/bash
[[ ! -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-url="${TUNASYNC_S3_ENDPOINT}" s3 sync ${TUNASYNC_AWS_OPTIONS} "${TUNASYNC_UPSTREAM_URL}" "${TUNASYNC_WORKING_DIR}"