Ticket #27566: patch-install.rb.diff
File patch-install.rb.diff, 1.5 KB (added by nigel@…, 14 years ago) |
---|
-
install.rb
old new 204 204 opts.on('--[no-]tests', 'Prevents the execution of unit tests.', 'Default on.') do |ontest| 205 205 InstallOptions.tests = ontest 206 206 end 207 opts.on('--[no-]configs', 'Prevents the installation of config files', 'Default off.') do |on test|208 InstallOptions.configs = on test207 opts.on('--[no-]configs', 'Prevents the installation of config files', 'Default off.') do |onconfigs| 208 InstallOptions.configs = onconfigs 209 209 end 210 210 opts.on('--destdir[=OPTIONAL]', 'Installation prefix for all targets', 'Default essentially /') do |destdir| 211 211 InstallOptions.destdir = destdir … … 300 300 mandir = Config::CONFIG['mandir'] 301 301 end 302 302 303 # To be deprecated once people move over to using --destdir option 304 if (destdir = ENV['DESTDIR']) 305 configdir = "#{destdir}#{configdir}" 306 bindir = "#{destdir}#{bindir}" 307 sbindir = "#{destdir}#{sbindir}" 308 mandir = "#{destdir}#{mandir}" 309 sitelibdir = "#{destdir}#{sitelibdir}" 310 311 FileUtils.makedirs(configdir) if InstallOptions.configs 312 FileUtils.makedirs(bindir) 313 FileUtils.makedirs(sbindir) 314 FileUtils.makedirs(mandir) 315 FileUtils.makedirs(sitelibdir) 316 # This is the new way forward 317 elsif (destdir = InstallOptions.destdir) 303 if (destdir = InstallOptions.destdir) 318 304 configdir = "#{destdir}#{configdir}" 319 305 bindir = "#{destdir}#{bindir}" 320 306 sbindir = "#{destdir}#{sbindir}"