Compare commits
No commits in common. "83384902676b38271b45cc33ce32a7404a37b55a" and "182343e995d5f1d63de94328bc6542ca5487b457" have entirely different histories.
8338490267
...
182343e995
@ -182,7 +182,7 @@ migrate() {
|
|||||||
[[ ${source_dir} = "" ]] && __err "You must provide a source directory (s3) as the first parameter" && return 137
|
[[ ${source_dir} = "" ]] && __err "You must provide a source directory (s3) as the first parameter" && return 137
|
||||||
[[ ${target_dir} = "" ]] && __err "You must provide a target directory (s3) as the second parameter" && return 137
|
[[ ${target_dir} = "" ]] && __err "You must provide a target directory (s3) as the second parameter" && return 137
|
||||||
|
|
||||||
__warn "Migrating s3://${source_dir} to s3://${target_dir}"
|
__warn "Migrating s3://${source} to s3://${target}"
|
||||||
|
|
||||||
echo "Cache expires on ${EXPIRES}"
|
echo "Cache expires on ${EXPIRES}"
|
||||||
|
|
||||||
@ -196,30 +196,6 @@ migrate() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
move() {
|
|
||||||
local source_dir="$1"
|
|
||||||
shift
|
|
||||||
local target_dir="$1"
|
|
||||||
shift
|
|
||||||
local args="$@"
|
|
||||||
|
|
||||||
[[ ${source_dir} = "" ]] && __err "You must provide a source directory (s3) as the first parameter" && return 137
|
|
||||||
[[ ${target_dir} = "" ]] && __err "You must provide a target directory (s3) as the second parameter" && return 137
|
|
||||||
|
|
||||||
__warn "Migrating s3://${source_dir} to s3://${target_dir}"
|
|
||||||
|
|
||||||
echo "Cache expires on ${EXPIRES}"
|
|
||||||
|
|
||||||
docker run --rm \
|
|
||||||
-u $(id -u):$(id -g) \
|
|
||||||
--env AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} \
|
|
||||||
--env AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY} \
|
|
||||||
--env AWS_DEFAULT_REGION=${AWS_DEFAULT_REGION} \
|
|
||||||
${SERVICE_NAME} \
|
|
||||||
aws s3 mv "s3://${source_dir}" "s3://${target_dir}" ${args} --recursive --acl "${ACL}" --expires "${EXPIRES}" --cache-control "max-age=${CACHE_MAX_AGE}" --metadata-directive REPLACE
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
setPermissions() {
|
setPermissions() {
|
||||||
local target_dir="$1"
|
local target_dir="$1"
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user