s3 bucket

This commit is contained in:
Kenneth Reitz
2012-08-06 05:49:49 -04:00
parent f4a0672b3b
commit bca5e90d59
+11 -2
View File
@@ -13,7 +13,7 @@ function puts-step (){
# Argument parsing.
while getopts ":f:x:p:" opt; do
while getopts ":f:x:p:r:" opt; do
case $opt in
f)
FORMULA=$OPTARG
@@ -28,6 +28,10 @@ while getopts ":f:x:p:" opt; do
ARCHIVE=$OPTARG
echo "Using archive: $OPTARG" >&2
;;
r)
S3_BUCKET=$OPTARG
echo "Using s3 bucket: $OPTARG" >&2
;;
\?)
echo "Invalid option: -$OPTARG" >&2
exit 1
@@ -62,4 +66,9 @@ $(pwd)/formula/$FORMULA $PREFIX_PATH | indent
if [ "$ARCHIVE" ]; then
tar cjf $ARCHIVE $PREFIX_PATH
fi
fi
if [ "$S3_BUCKET" ]; then
s3put -b $S3_BUCKET $ARCHIVE
fi