From bca5e90d59e0c7cbe6402c7b2ae38deb239f0331 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Mon, 6 Aug 2012 05:49:49 -0400 Subject: [PATCH] s3 bucket --- build.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 01e0fc4..84698a6 100755 --- a/build.sh +++ b/build.sh @@ -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 \ No newline at end of file +fi + +if [ "$S3_BUCKET" ]; then + s3put -b $S3_BUCKET $ARCHIVE +fi +