Created
January 12, 2009 01:53
-
-
Save avescodes/45851 to your computer and use it in GitHub Desktop.
Quick little git repo editor
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
#!/opt/local/bin/ruby -w | |
require 'YAML' | |
# Example ~/.git_repos : | |
# repos: | |
# - "~/dev/gh/joust" | |
# - "~/dev/gh/joust/meta" | |
config = YAML.load_file(ENV['HOME'] + "/.git_repos") | |
config['repos'].each do |f| | |
f.gsub!('~',ENV['HOME']) | |
puts "Updating #{f.split('/')[-1]}" | |
puts "\t#{`cd #{f}; git pull`}" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment