summaryrefslogtreecommitdiffstats
path: root/documentation/Rakefile
diff options
context:
space:
mode:
Diffstat (limited to 'documentation/Rakefile')
-rw-r--r--documentation/Rakefile17
1 files changed, 16 insertions, 1 deletions
diff --git a/documentation/Rakefile b/documentation/Rakefile
index 3da422e6d..640a7cf5d 100644
--- a/documentation/Rakefile
+++ b/documentation/Rakefile
@@ -36,7 +36,22 @@ docs = %w{configref typedocs reports functions}
docs.each do |doc|
task doc do
- sh %{puppetdoc --mode %s > documentation/reference/%s.page} % [doc, doc]
+ docs = %x{puppetdoc --mode #{doc}}
+
+ header = "documentation/reference/%s.header" % doc
+ if FileTest.exists?(header)
+ headertext = File.read(header)
+ else
+ headertext = ""
+ end
+
+ file = "documentation/reference/%s.page" % doc
+
+ puts "Creating %s" % file
+ File.open(file, "w") do |f|
+ f.puts headertext
+ f.puts docs
+ end
end
end