Created
September 24, 2013 05:19
-
-
Save netkiller/6680668 to your computer and use it in GitHub Desktop.
batch git pull
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
#!/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