Skip to content

Instantly share code, notes, and snippets.

@netkiller
Created September 24, 2013 05:19
Show Gist options
  • Save netkiller/6680668 to your computer and use it in GitHub Desktop.
Save netkiller/6680668 to your computer and use it in GitHub Desktop.
batch git pull
#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
def t s
p s
Thread.new { system s }
end
`find ~/workspace/ -maxdepth 1 -type d`.each_line do |x|
#print x
t "cd #{x.strip} && git pull"
end
sleep 0.3 while Thread.list.size != 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment