36
36
require 'optparse'
37
37
require 'ostruct'
38
38
39
- begin
40
- require 'rdoc/rdoc'
41
- $haverdoc = true
42
- rescue LoadError
43
- puts "Missing rdoc; skipping documentation"
44
- $haverdoc = false
45
- end
46
-
47
39
PREREQS = %w{ openssl facter cgi }
48
40
MIN_FACTER_VERSION = 1.5
49
41
@@ -140,25 +132,9 @@ def prepare_installation
140
132
InstallOptions . check_prereqs = true
141
133
InstallOptions . batch_files = true
142
134
143
- # Only try to do docs if we're sure they have rdoc
144
- if $haverdoc
145
- InstallOptions . rdoc = true
146
- InstallOptions . ri = true
147
- else
148
- InstallOptions . rdoc = false
149
- InstallOptions . ri = false
150
- end
151
-
152
-
153
135
ARGV . options do |opts |
154
136
opts . banner = "Usage: #{ File . basename ( $0) } [options]"
155
137
opts . separator ""
156
- opts . on ( '--[no-]rdoc' , 'Prevents the creation of RDoc output.' , 'Default on.' ) do |onrdoc |
157
- InstallOptions . rdoc = onrdoc
158
- end
159
- opts . on ( '--[no-]ri' , 'Prevents the creation of RI output.' , 'Default off on mswin32.' ) do |onri |
160
- InstallOptions . ri = onri
161
- end
162
138
opts . on ( '--[no-]configs' , 'Prevents the installation of config files' , 'Default off.' ) do |ontest |
163
139
InstallOptions . configs = ontest
164
140
end
@@ -205,14 +181,8 @@ def prepare_installation
205
181
InstallOptions . batch_files = false
206
182
end
207
183
opts . on ( '--quick' , 'Performs a quick installation. Only the' , 'installation is done.' ) do |quick |
208
- InstallOptions . rdoc = false
209
- InstallOptions . ri = false
210
- InstallOptions . configs = true
211
- end
212
- opts . on ( '--full' , 'Performs a full installation. All' , 'optional installation steps are run.' ) do |full |
213
- InstallOptions . rdoc = true
214
- InstallOptions . ri = true
215
184
InstallOptions . configs = true
185
+ warn "--quick is deprecated. Use --configs"
216
186
end
217
187
opts . separator ( "" )
218
188
opts . on_tail ( '--help' , "Shows this help text." ) do
@@ -381,36 +351,6 @@ def join(basedir, dir)
381
351
"#{ basedir } #{ dir } "
382
352
end
383
353
384
- ##
385
- # Build the rdoc documentation. Also, try to build the RI documentation.
386
- #
387
- def build_rdoc ( files )
388
- return unless $haverdoc
389
- begin
390
- r = RDoc ::RDoc . new
391
- r . document ( [ "--main" , "README" , "--title" , "Puppet -- Site Configuration Management" , "--line-numbers" ] + files )
392
- rescue RDoc ::RDocError => e
393
- $stderr. puts e . message
394
- rescue Exception => e
395
- $stderr. puts "Couldn't build RDoc documentation\n #{ e . message } "
396
- end
397
- end
398
-
399
- def build_ri ( files )
400
- return unless $haverdoc
401
- return if $osname == "windows"
402
- begin
403
- ri = RDoc ::RDoc . new
404
- #ri.document(["--ri-site", "--merge"] + files)
405
- ri . document ( [ "--ri-site" ] + files )
406
- rescue RDoc ::RDocError => e
407
- $stderr. puts e . message
408
- rescue Exception => e
409
- $stderr. puts "Couldn't build Ri documentation\n #{ e . message } "
410
- $stderr. puts "Continuing with install..."
411
- end
412
- end
413
-
414
354
##
415
355
# Install file(s) from ./bin to RbConfig::CONFIG['bindir']. Patch it on the way
416
356
# to insert a #! line; on a Unix install, the command is named as expected
@@ -476,8 +416,6 @@ def install_binfile(from, op_file, target)
476
416
# Set these values to what you want installed.
477
417
configs = glob ( %w{ conf/puppet.conf conf/hiera.yaml } )
478
418
bins = glob ( %w{ bin/* } )
479
- #rdoc = glob(%w{bin/* lib/**/*.rb README* }).reject { |e| e=~ /\.(bat|cmd)$/ }
480
- #ri = glob(%w{bin/*.rb lib/**/*.rb}).reject { |e| e=~ /\.(bat|cmd)$/ }
481
419
man = glob ( %w{ man/man[0-9]/* } )
482
420
libs = glob ( %w{ lib/**/* } )
483
421
locales = glob ( %w{ locales/**/* } )
@@ -488,8 +426,6 @@ def install_binfile(from, op_file, target)
488
426
windows_bins = glob ( %w{ ext/windows/*bat } )
489
427
end
490
428
491
- #build_rdoc(rdoc) if InstallOptions.rdoc
492
- #build_ri(ri) if InstallOptions.ri
493
429
do_configs ( configs , InstallOptions . config_dir ) if InstallOptions . configs
494
430
do_bins ( bins , InstallOptions . bin_dir )
495
431
do_bins ( windows_bins , InstallOptions . bin_dir , 'ext/windows/' ) if $osname == "windows" && InstallOptions . batch_files
0 commit comments