Created
September 3, 2010 03:42
-
-
Save nanodeath/563388 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
x_file = "x.txt" | |
task :prepare_x do | |
bunch_of_files = calculate_all_upstream_files_slowly | |
bunch_of_files.each {|filename| file x_file => filename} | |
end | |
task :real_x => [x_file] | |
task :x => [:prepare_x, :real_x] |
This file contains hidden or 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
file "x.txt" => ["a.txt"] | |
file "x.txt" => ["b.txt"] | |
file "x.txt" => ["c.txt"] | |
file "x.txt" do | |
output = File.read("a.txt") + File.read("b.txt") + File.read("c.txt") | |
File.open("x.txt", "w") {|f| f.write(output) } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment