diff options
author | James Turnbull <james@lovedthanlost.net> | 2011-03-02 16:49:13 +1100 |
---|---|---|
committer | James Turnbull <james@lovedthanlost.net> | 2011-03-02 16:53:28 +1100 |
commit | 3e7ebbbb08120243f7e982f34b8256ec58af67b0 (patch) | |
tree | cb5a15ac50b907b60b2478535ca7329954f11fee /install.rb | |
parent | 85e3174c060bc3bcde352872c83c7183b296b011 (diff) | |
download | puppet-3e7ebbbb08120243f7e982f34b8256ec58af67b0.tar.gz puppet-3e7ebbbb08120243f7e982f34b8256ec58af67b0.tar.xz puppet-3e7ebbbb08120243f7e982f34b8256ec58af67b0.zip |
Fixed #6554 - Missing $haveftool if/else conditional in install.rb breaking Ruby 1.9
Diffstat (limited to 'install.rb')
-rwxr-xr-x | install.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/install.rb b/install.rb index 7627a8d11..2608e31da 100755 --- a/install.rb +++ b/install.rb @@ -92,8 +92,12 @@ def do_configs(configs, target, strip = 'conf/') Dir.mkdir(target) unless File.directory? target configs.each do |cf| ocf = File.join(InstallOptions.config_dir, cf.gsub(/#{strip}/, '')) - File.install(cf, ocf, 0644, true) - end + if $haveftools + File.install(cf, ocf, 0644, true) + else + FileUtils.install(cf, ocf, {:mode => 0644, :verbose => true}) + end + end end def do_bins(bins, target, strip = 's?bin/') |