Skip to content

Instantly share code, notes, and snippets.

@shirishp
Created January 7, 2017 20:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shirishp/73b454eddb4946aab6c99efe602200ca to your computer and use it in GitHub Desktop.
Save shirishp/73b454eddb4946aab6c99efe602200ca to your computer and use it in GitHub Desktop.
Each
#!/usr/bin/env ruby
Dir.entries('./').select do |entry|
next unless File.directory? File.join('./', entry, '.git')
if File.directory? File.join('./', entry)
puts "Repo #{entry}..."
cmd = ARGV.join(' ')
Dir.chdir(entry) {
puts `#{cmd}`
}
puts "*******************"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment