diff options
Diffstat (limited to 'install.rb')
-rwxr-xr-x | install.rb | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/install.rb b/install.rb index b5aba4215..a2cbdb429 100755 --- a/install.rb +++ b/install.rb @@ -51,10 +51,10 @@ begin if $haverdoc rst2man = %x{which rst2man.py} $haveman = true - else + else $haveman = false end -rescue +rescue puts "Missing rst2man; skipping man page creation" $haveman = false end @@ -151,6 +151,15 @@ def prepare_installation InstallOptions.tests = true + if $haveman + InstallOptions.man = true + if RUBY_PLATFORM == "i386-mswin32" + InstallOptions.man = false + end + else + InstallOptions.man = false + end + ARGV.options do |opts| opts.banner = "Usage: #{File.basename($0)} [options]" opts.separator "" @@ -188,6 +197,7 @@ def prepare_installation end opts.on('--full', 'Performs a full installation. All', 'optional installation steps are run.') do |full| InstallOptions.rdoc = true + InstallOptions.man = true InstallOptions.ri = true InstallOptions.tests = true end @@ -322,13 +332,13 @@ def build_man(bins) File.unlink("./puppet.conf.rst") # Create binary man pages - bins.each do |bin| + bins.each do |bin| b = bin.gsub( "bin/", "") %x{#{bin} --help > ./#{b}.rst} %x{#{rst2man} ./#{b}.rst ./man/man8/#{b}.8} File.unlink("./#{b}.rst") end - rescue SystemCallError + rescue SystemCallError $stderr.puts "Couldn't build man pages: " + $! $stderr.puts "Continuing with install..." end |