summaryrefslogtreecommitdiffstats
path: root/install.rb
diff options
context:
space:
mode:
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