-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom s3 endpoint support #28
Changes from 8 commits
99bce93
feeee33
55c1e2a
f6d75c5
05c7fa8
571a317
52eccb5
8e1f685
4b4c8a2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -19,7 +19,12 @@ DATE_CMD="/bin/date" | |||||||||||||||
# arguments: 1. s3 url (s3://.../...) | ||||||||||||||||
s3_exists() { | ||||||||||||||||
if [ $# -ne 1 ]; then return 255; fi | ||||||||||||||||
${AWSCLI} ${AWSCLIOPT} ${AWSCLI_LIST_OPT} $1 >/dev/null | ||||||||||||||||
if [ -z "$AWSCLI_ENDPOINT_OPT" ] | ||||||||||||||||
then | ||||||||||||||||
${AWSCLI} ${AWSCLIOPT} ${AWSCLI_LIST_OPT} $1 >/dev/null | ||||||||||||||||
else | ||||||||||||||||
${AWSCLI} --endpoint-url ${AWSCLI_ENDPOINT_OPT} ${AWSCLIOPT} ${AWSCLI_LIST_OPT} $1 >/dev/null | ||||||||||||||||
fi | ||||||||||||||||
} | ||||||||||||||||
gs_exists() { | ||||||||||||||||
if [ $# -ne 1 ]; then return 255; fi | ||||||||||||||||
|
@@ -29,7 +34,12 @@ gs_exists() { | |||||||||||||||
# Output the list of the files on specified S3 URL. | ||||||||||||||||
# arguments: 1. s3 url (s3://...) | ||||||||||||||||
s3_list_files() { | ||||||||||||||||
${AWSCLI} ${AWSCLIOPT} ${AWSCLI_LIST_OPT} $1 | ||||||||||||||||
if [ -z "$AWSCLI_ENDPOINT_OPT" ] | ||||||||||||||||
then | ||||||||||||||||
${AWSCLI} ${AWSCLIOPT} ${AWSCLI_LIST_OPT} $1 | ||||||||||||||||
else | ||||||||||||||||
${AWSCLI} --endpoint-url ${AWSCLI_ENDPOINT_OPT} ${AWSCLIOPT} ${AWSCLI_LIST_OPT} $1 | ||||||||||||||||
fi | ||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||
} | ||||||||||||||||
gs_list_files() { | ||||||||||||||||
${GCSCLI} ${GCSCLIOPT} ${GCSCLI_LIST_OPT} $1 | ||||||||||||||||
|
@@ -39,7 +49,12 @@ gs_list_files() { | |||||||||||||||
# arguments: 1. s3 url (s3://.../...) | ||||||||||||||||
s3_delete_file() { | ||||||||||||||||
if [ $# -ne 1 ]; then return 255; fi | ||||||||||||||||
${AWSCLI} ${AWSCLIOPT} ${AWSCLI_DEL_OPT} $1 | ||||||||||||||||
if [ -z "$AWSCLI_ENDPOINT_OPT" ] | ||||||||||||||||
then | ||||||||||||||||
${AWSCLI} ${AWSCLIOPT} ${AWSCLI_DEL_OPT} $1 | ||||||||||||||||
else | ||||||||||||||||
${AWSCLI} --endpoint-url ${AWSCLI_ENDPOINT_OPT} ${AWSCLIOPT} ${AWSCLI_DEL_OPT} $1 | ||||||||||||||||
fi | ||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||
} | ||||||||||||||||
gs_delete_file() { | ||||||||||||||||
if [ $# -ne 1 ]; then return 255; fi | ||||||||||||||||
|
@@ -57,7 +72,11 @@ gs_delete_file() { | |||||||||||||||
# 2. target s3 url (s3://...) | ||||||||||||||||
s3_copy_file() { | ||||||||||||||||
if [ $# -ne 2 ]; then return 255; fi | ||||||||||||||||
${AWSCLI} ${AWSCLIOPT} ${AWSCLI_COPY_OPT} $1 $2 | ||||||||||||||||
if [ -z "$AWSCLI_ENDPOINT_OPT" ] | ||||||||||||||||
then | ||||||||||||||||
${AWSCLI} ${AWSCLIOPT} ${AWSCLI_COPY_OPT} $1 $2 | ||||||||||||||||
else | ||||||||||||||||
${AWSCLI} --endpoint-url ${AWSCLI_ENDPOINT_OPT} ${AWSCLIOPT} ${AWSCLI_COPY_OPT} $1 $2 | ||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is no "fi" on line 80 and it is a syntax error.
Suggested change
|
||||||||||||||||
} | ||||||||||||||||
gs_copy_file() { | ||||||||||||||||
if [ $# -ne 2 ]; then return 255; fi | ||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.