Skip to content

Instantly share code, notes, and snippets.

@boertel
Created August 13, 2014 22:28
Show Gist options
  • Save boertel/f0703c48dc15132d771c to your computer and use it in GitHub Desktop.
Save boertel/f0703c48dc15132d771c to your computer and use it in GitHub Desktop.
Hub Builder
#!/bin/bash
GITROOT=`git rev-parse --show-toplevel`
NAME=`basename $GITROOT`
s3cmd ls | cut -d ' ' -f 4 | sed -e 's/s3:\/\///g' | grep $NAME || s3cmd mb s3://$NAME
echo "Deploying $NAME..."
s3cmd sync --no-preserve --delete-removed --skip-existing --rexclude='.git/' $GITROOT s3://$NAME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment