summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Turnbull <james@lovedthanlost.net>2008-01-20 10:29:23 +1100
committerJames Turnbull <james@lovedthanlost.net>2008-01-20 10:29:23 +1100
commit4ede432f4da9bb5529830f7a5c022a3245219303 (patch)
tree69841cfa903dfa6e017fb3de376e6b3e76ad2b51
parent0a7b028a9abf48e5358e7032cf3f3184c4c3ba5e (diff)
downloadpuppet-4ede432f4da9bb5529830f7a5c022a3245219303.tar.gz
puppet-4ede432f4da9bb5529830f7a5c022a3245219303.tar.xz
puppet-4ede432f4da9bb5529830f7a5c022a3245219303.zip
Tidied the man page creation function and created "master" branch man pages
-rwxr-xr-xinstall.rb13
-rw-r--r--man/man8/puppet.82
2 files changed, 8 insertions, 7 deletions
diff --git a/install.rb b/install.rb
index 6dbb3e0e3..5d8ae2de0 100755
--- a/install.rb
+++ b/install.rb
@@ -240,22 +240,23 @@ end
def build_man(bins)
return unless $haveman
begin
- # Create binary man pages
+ # Locate rst2man
rst2man = %x{which rst2man.py}
rst2man.chomp!
+ # Create puppet.conf.8 man page
%x{bin/puppetdoc --reference configuration > ./puppet.conf.rst}
%x{#{rst2man} ./puppet.conf.rst ./man/man8/puppet.conf.8}
+ File.unlink("./puppet.conf.rst")
+ # Create binary man pages
bins.each do |bin|
b = bin.gsub( "bin/", "")
%x{#{bin} --help > ./#{b}.rst}
%x{#{rst2man} ./#{b}.rst ./man/man8/#{b}.8}
-
- # Delete temporary files
- File.unlink("./#{b}.rst","./puppet.conf.rst")
+ File.unlink("./#{b}.rst")
end
- rescue
- $stderr.puts "Couldn't build man pages"
+ rescue SystemCallError
+ $stderr.puts "Couldn't build man pages: " + $!
$stderr.puts "Continuing with install..."
end
end
diff --git a/man/man8/puppet.8 b/man/man8/puppet.8
index 099d13d97..1bfea08f9 100644
--- a/man/man8/puppet.8
+++ b/man/man8/puppet.8
@@ -74,5 +74,5 @@ Copyright (c) 2005 Reductive Labs, LLC Licensed under the GNU Public
License
-.\" Generated by docutils manpage writer on 2008-01-15 00:12.
+.\" Generated by docutils manpage writer on 2008-01-20 10:28.
.\"