HCoop
/
clinton
/
scripts.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
db0b4e2
)
s3: Parameterize curl command.
author
mwolson_admin
<mwolson_admin@deleuze.hcoop.net>
Wed, 25 Jun 2008 21:44:40 +0000
(17:44 -0400)
committer
mwolson_admin
<mwolson_admin@deleuze.hcoop.net>
Wed, 25 Jun 2008 21:44:40 +0000
(17:44 -0400)
s3
patch
|
blob
|
blame
|
history
diff --git
a/s3
b/s3
index
4f26efe
..
351bd0d
100755
(executable)
--- a/
s3
+++ b/
s3
@@
-3,6
+3,7
@@
# Licensed under the terms of the GNU GPL v2
# Copyright 2007 Victor Lowther <victor.lowther@gmail.com>
# Licensed under the terms of the GNU GPL v2
# Copyright 2007 Victor Lowther <victor.lowther@gmail.com>
+CURL=/home/mwolson_admin/bin/curl
HMAC=$(dirname $0)/s3-hmac
# print a message and bail
HMAC=$(dirname $0)/s3-hmac
# print a message and bail
@@
-46,7
+47,7
@@
check_hmac() {
}
check_deps() {
}
check_deps() {
- check_dep openssl date cat grep
curl
+ check_dep openssl date cat grep
check_hmac
check_s3
}
check_hmac
check_s3
}
@@
-156,7
+157,7
@@
s3_curl() {
headers[${#headers[@]}]="Authorization: AWS ${S3_ACCESS_KEY_ID}:${sig}"
headers[${#headers[@]}]="Date: ${date}"
[[ ${md5} ]] && headers[${#headers[@]}]="Content-MD5: ${md5}"
headers[${#headers[@]}]="Authorization: AWS ${S3_ACCESS_KEY_ID}:${sig}"
headers[${#headers[@]}]="Date: ${date}"
[[ ${md5} ]] && headers[${#headers[@]}]="Content-MD5: ${md5}"
-
curl
${arg} "${inout}" ${stdopts} -K <(curl_headers "${headers[@]}") \
+
$CURL
${arg} "${inout}" ${stdopts} -K <(curl_headers "${headers[@]}") \
"http://s3.amazonaws.com${bucket}${remote}"
return $?
}
"http://s3.amazonaws.com${bucket}${remote}"
return $?
}