Created
November 30, 2011 12:36
-
-
Save shtirlic/1408924 to your computer and use it in GitHub Desktop.
Script for git repo backup in dropbox via git bundle
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
#!/usr/bin/env ruby | |
if __FILE__ == $0 | |
bundle_name = ARGV[0] if (ARGV[0]) | |
bundle_name = `pwd`.split('/').last.chomp if bundle_name.nil? | |
bundle_name += ".git.bundle" | |
puts "Backing up to bundle #{bundle_name}" | |
`git bundle create ~/Dropbox/backup/git-repos/#{bundle_name} --all` | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment