Created
January 31, 2013 06:53
-
-
Save ankane/4680869 to your computer and use it in GitHub Desktop.
Clone all Heroku repos
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
output = %x[heroku apps] | |
repos = output.split("\n").select{|line| line.length > 0 and line[0..2] != "===" }.map{|line| line.split[0] } | |
repos.each do |repo| | |
unless Dir.exists?(repo) | |
puts %x[git clone [email protected]:#{repo}.git] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment