Created
April 17, 2011 08:33
-
-
Save wereHamster/923853 to your computer and use it in GitHub Desktop.
gmail backup script
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 | |
/usr/bin/offlineimap -u Noninteractive.Quiet | |
cd "$HOME/gmail" | |
test -z "$(git status -s)" && exit | |
git ls-files --deleted -z | xargs -0 git rm --cached | |
git ls-files --modified --others -z | xargs -0 git update-index --add | |
git commit --quiet -m "..." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment