When generating a PDF with Maruku, there are a bunch of files left over that are used when generating the PDF (.tex,
.log, .out, .aux).
Users probably don't expect a whole bunch of other files when asking for a PDF, so it'd be nice if Maruku could clean
up after itself.
Here's a patch to do just that:
Index: bin/maruku
===================================================================
--- bin/maruku (revision 173)
+++ bin/maruku (working copy)
@@ -165,6 +165,8 @@
# run twice for cross references
system cmd
system cmd
+ # clean up stale files
+ Dir.glob("#{job}\.*[^pdf]") do |cruft| File.delete(cruft) end
end
end
I couldn't find any obvious place to add tests. If there's some place I should be doing this please let me know. |