Created
April 30, 2009 10:39
-
-
Save entropie/104397 to your computer and use it in GitHub Desktop.
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 | |
# | |
# | |
# Author: Michael 'entropie' Trommer <[email protected]> | |
# | |
require "pathname" | |
require "fileutils" | |
DIR = Pathname.new(File.expand_path("~/Source")) | |
EX = DIR.join("Extern/fast-export").join("hg-fast-export.sh") | |
skip = ["Extern", "entropie.github.com", "gaubln", "oms.git", "oooms", "GIT"] | |
FileUtils.mkdir_p(TDIR=(DIR.join("GIT"))) | |
DIR.entries.select{|e| e.to_s[0..0] != "."}.each do |content| | |
next if skip.include?(content.to_s) | |
FileUtils.mkdir_p(TDIR.join(nname = content.to_s + ".git")) | |
system "cd #{DIR.join("GIT", nname)} && git init" | |
system "cd #{DIR.join("GIT", nname)} && sh #{EX} -r #{DIR.join(content)}" | |
sleep 5 | |
end | |
=begin | |
Local Variables: | |
mode:ruby | |
fill-column:70 | |
indent-tabs-mode:nil | |
ruby-indent-level:2 | |
End: | |
=end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment