Created
December 29, 2013 22:55
-
-
Save blitzcode/8175735 to your computer and use it in GitHub Desktop.
Git RSync Backup Post Commit Hook
This file contains hidden or 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/sh | |
if [ -d "/Volumes/Backup SD" ]; then | |
echo "rsync backup of .git to SD card..." | |
rsync $GIT_DIR --delete --times --recursive --checksum --compress --human-readable --stats /Volumes/Backup\ SD/ | |
else | |
echo "SD card 'Backup SD' not inserted, NOT doing the rsync backup" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment