diff options
| author | nfagerlund <nick.fagerlund@gmail.com> | 2011-02-16 16:01:16 -0800 |
|---|---|---|
| committer | nfagerlund <nick.fagerlund@gmail.com> | 2011-02-17 12:00:14 -0800 |
| commit | c61952001509768faa7fa09e7ddc2e7d86f2981f (patch) | |
| tree | 448e10b55bc850d61142982564e7bfbf96ff65ba /tasks/rake | |
| parent | 9e19d2267dfd254a12f1fe5fc37a524af8e1efc7 (diff) | |
| download | puppet-c61952001509768faa7fa09e7ddc2e7d86f2981f.tar.gz puppet-c61952001509768faa7fa09e7ddc2e7d86f2981f.tar.xz puppet-c61952001509768faa7fa09e7ddc2e7d86f2981f.zip | |
(#1204) Move man generation task from install.rb to a rake task
Having this be commented-out code in the installer script doesn't really
make sense for our workflow; we want to be able to regenerate these manpages at will
and make sure they're always up-to-date. This will help us keep them in sync with the help text.
This commit also changes the ronn invocation to specify a manual name and organization.
Diffstat (limited to 'tasks/rake')
| -rw-r--r-- | tasks/rake/manpages.rake | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tasks/rake/manpages.rake b/tasks/rake/manpages.rake new file mode 100644 index 000000000..752a6a7a6 --- /dev/null +++ b/tasks/rake/manpages.rake @@ -0,0 +1,27 @@ +# require 'fileutils' + +desc "Build Puppet manpages" +task :gen_manpages do + + sbins = Dir.glob(%w{sbin/*}) + bins = Dir.glob(%w{bin/*}) + + # Locate ronn + ronn = %x{which ronn} + ronn.chomp! + # Create puppet.conf.5 man page + %x{RUBYLIB=./lib:$RUBYLIB bin/puppetdoc --reference configuration > ./man/man5/puppetconf.5.ronn} + %x{#{ronn} --manual="Puppet manual" --organization="Puppet Labs, LLC" -r ./man/man5/puppetconf.5.ronn} + File.move("./man/man5/puppetconf.5", "./man/man5/puppet.conf.5") + File.unlink("./man/man5/puppetconf.5.ronn") + + # Create binary man pages + binary = bins + sbins + binary.each do |bin| + b = bin.gsub( /(bin|sbin)\//, "") + %x{RUBYLIB=./lib:$RUBYLIB #{bin} --help > ./man/man8/#{b}.8.ronn} + %x{#{ronn} --manual="Puppet manual" --organization="Puppet Labs, LLC" -r ./man/man8/#{b}.8.ronn} + File.unlink("./man/man8/#{b}.8.ronn") + end + +end
\ No newline at end of file |
