Created
November 7, 2010 13:48
-
-
Save littlefolk/666131 to your computer and use it in GitHub Desktop.
Rakefile: gitmodules update.
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
require "iniparse" | |
document = IniParse.parse(File.read(".gitmodules")) | |
document.each do |line| | |
desc "git-pull #{line.key}" | |
task line["path"] do | |
cd line["path"] do | |
sh "git pull" do |ok, res| | |
if ok | |
sh "git log HEAD@{1}..HEAD --reverse --oneline" | |
end | |
end | |
end | |
end | |
end | |
# rake hoge\ => rake hoge | |
rule "\\" => "%{\\\\,}X" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment