lib/kuzushi.rb in kuzushi-0.0.19 vs lib/kuzushi.rb in kuzushi-0.0.20
- old
+ new
@@ -190,11 +190,13 @@
end
end
def write_file(src, dest, &blk)
fetch(src) do |file|
- FileUtils.mkdir_p(File.dirname(dest))
- File.open(dest,"w") { |f| f.write(blk.call(file)) }
+ task "write #{dest}" do
+ FileUtils.mkdir_p(File.dirname(dest))
+ File.open(dest,"w") { |f| f.write(blk.call(file)) }
+ end
end
end
def handle_crontab(src, user = "root", &blk)
## FIXME - this is getting a little silly calling tmpfile twice - should be able to pass erb to fetch as an opton...