Submodules task and subrake check

This commit is contained in:
tlrobinson committed 2009-03-25 18:17:14 -07:00
1 parent 5b95ff5ff3
commit 2652ece827
2 files changed
+17

No files matched your search

+9
View File
@@ -86,6 +86,15 @@ task :docs do
rm "debug.txt"
end
task :submodules do
if executable_exists? "git"
system %{git submodule init}
system %{git submodule update}
else
puts "Git not installed"
end
end
=begin
TODO: documentation
+8
View File
@@ -76,7 +76,11 @@ end
def subrake(directories, task_name)
directories.each do |directory|
if (File.directory?(directory) && File.file?(File.join(directory, "Rakefile")))
system %{cd #{directory} && #{$serialized_env} #{$0} #{task_name}}
else
puts "subrake missing: " + directory
end
end
end
@@ -107,6 +111,10 @@ def cat(files, outfile)
end
end
def executable_exists?(name)
ENV["PATH"].split(":").any? {|p| File.executable? File.join(p, name) }
end
$OBJJ_TEMPLATE_EXECUTABLE = File.join($HOME_DIR, 'Rake', 'lib', 'objj-executable')
def make_objj_executable(path)