summaryrefslogtreecommitdiffstats
path: root/install.rb
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 /install.rb
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
Diffstat (limited to 'install.rb')
-rwxr-xr-xinstall.rb13
1 files changed, 7 insertions, 6 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