~bkerensa/ubuntu/raring/puppet/new-upstream-release

« back to all changes in this revision

Viewing changes to install.rb

  • Committer: Bazaar Package Importer
  • Author(s): Mathias Gug
  • Date: 2010-10-21 12:52:13 UTC
  • mfrom: (1.1.18 upstream)
  • Revision ID: james.westby@ubuntu.com-20101021125213-x5pjaatmuv0i79jv
Tags: 2.6.3~rc1-0ubuntu1
* New upstream version
* debian/control:
  - move all puppet dependencies to puppet-common since all the code is
    actually located in puppet-common. 
  - move libaugeas from a recommend to a dependency.

Show diffs side-by-side

added added

removed removed

Lines of Context:
88
88
tests = glob(%w{test/**/*.rb})
89
89
 
90
90
def do_bins(bins, target, strip = 's?bin/')
 
91
  Dir.mkdir(target) unless File.directory? target
91
92
  bins.each do |bf|
92
93
    obf = bf.gsub(/#{strip}/, '')
93
94
    install_binfile(bf, obf, target)
154
155
# Prepare the file installation.
155
156
#
156
157
def prepare_installation
 
158
  $operatingsystem = Facter["operatingsystem"].value
 
159
 
157
160
  # Only try to do docs if we're sure they have rdoc
158
161
  if $haverdoc
159
162
    InstallOptions.rdoc  = true
160
 
    InstallOptions.ri  = RUBY_PLATFORM != "i386-mswin32"
 
163
    InstallOptions.ri  = $operatingsystem != "windows"
161
164
  else
162
165
    InstallOptions.rdoc  = false
163
166
    InstallOptions.ri  = false
166
169
 
167
170
  if $haveman
168
171
    InstallOptions.man = true
169
 
    if RUBY_PLATFORM == "i386-mswin32"
 
172
    if $operatingsystem == "windows"
170
173
      InstallOptions.man  = false
171
174
    end
172
175
  else
175
178
 
176
179
  InstallOptions.tests = true
177
180
 
178
 
  if $haveman
179
 
    InstallOptions.man = true
180
 
    if RUBY_PLATFORM == "i386-mswin32"
181
 
      InstallOptions.man  = false
182
 
    end
183
 
  else
184
 
    InstallOptions.man = false
185
 
  end
186
 
 
187
181
  ARGV.options do |opts|
188
182
    opts.banner = "Usage: #{File.basename($0)} [options]"
189
183
    opts.separator ""
418
412
    end
419
413
  end
420
414
 
421
 
  if Config::CONFIG["target_os"] =~ /win/io and Config::CONFIG["target_os"] !~ /darwin/io
 
415
  if $operatingsystem == "windows"
422
416
    installed_wrapper = false
423
417
 
424
418
    if File.exists?("#{from}.bat")
468
462
do_bins(sbins, InstallOptions.sbin_dir)
469
463
do_bins(bins, InstallOptions.bin_dir)
470
464
do_libs(libs)
471
 
do_man(man)
 
465
do_man(man) unless $operatingsystem == "windows"