Skip to content

Instantly share code, notes, and snippets.

@paul
Created April 6, 2010 17:18
Show Gist options
  • Select an option

  • Save paul/357835 to your computer and use it in GitHub Desktop.

Select an option

Save paul/357835 to your computer and use it in GitHub Desktop.
#!/bin/bash
BRANCH=`git branch --no-color | grep \* | awk '{ print $2 }'`
VERSION=`git branch --no-color -v | grep \* | awk '{ print $3 }'`
FILENAME=delta-$VERSION.tar.bz2
S3PATH=s3://ssbe/delta/$BRANCH
if [ ! -e $FILENAME ]
then
tar -cjvf $FILENAME bin/ lib/
fi
s3cmd put -P $FILENAME $S3PATH/$FILENAME
s3cmd del $S3PATH/latest.tar.bz2
s3cmd cp -P $S3PATH/$FILENAME $S3PATH/latest.tar.bz2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment