This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# a post-receive hook for git servers to tar the current repo and send to s3 for backup | |
# save as 'post-receive' and put it in .git/hooks of desired repo(s), chmod +x | |
# assumes you have the s3cmd program installed and configured (sudo apt-get install s3cmd) | |
echo "thanks for the push. have a nice day." | |
# configure your S3BUCKET name, the rest should be automatic |