summaryrefslogtreecommitdiff
path: root/lib/rubygems/commands/pristine_command.rb
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-09-14 08:59:02 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-09-14 08:59:02 +0000
commit269503b544247b5b3e30dbe60a0bab4f2ca00e4e (patch)
treea6d0a3a9b34017c4c84d997152a3aaf3086e1ce1 /lib/rubygems/commands/pristine_command.rb
parent2614d9ba2fb5ad171200cccc88f42fa659b527c6 (diff)
Revert r42938 "* lib/rubygems: Update to RubyGems 2.1.3"
It breaks build. http://u64.rubyci.org/~chkbuild/ruby-trunk/log/20130913T200302Z.diff.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42941 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/commands/pristine_command.rb')
-rw-r--r--lib/rubygems/commands/pristine_command.rb19
1 files changed, 15 insertions, 4 deletions
diff --git a/lib/rubygems/commands/pristine_command.rb b/lib/rubygems/commands/pristine_command.rb
index 8d479211ac..3f3bca45be 100644
--- a/lib/rubygems/commands/pristine_command.rb
+++ b/lib/rubygems/commands/pristine_command.rb
@@ -31,6 +31,12 @@ class Gem::Commands::PristineCommand < Gem::Command
options[:only_executables] = value
end
+ add_option('-E', '--[no-]env-shebang',
+ 'Rewrite executables with a shebang',
+ 'of /usr/bin/env') do |value, options|
+ options[:env_shebang] = value
+ end
+
add_version_option('restore to', 'pristine condition')
end
@@ -105,16 +111,21 @@ with an extension.
Gem::RemoteFetcher.fetcher.download_to_cache dep
end
- # TODO use installer options
- install_defaults = Gem::ConfigFile::PLATFORM_DEFAULTS['install']
- installer_env_shebang = install_defaults.to_s['--env-shebang']
+ env_shebang =
+ if options.include? :env_shebang then
+ options[:env_shebang]
+ else
+ install_defaults = Gem::ConfigFile::PLATFORM_DEFAULTS['install']
+ install_defaults.to_s['--env-shebang']
+ end
installer = Gem::Installer.new(gem,
:wrappers => true,
:force => true,
:install_dir => spec.base_dir,
- :env_shebang => installer_env_shebang,
+ :env_shebang => env_shebang,
:build_args => spec.build_args)
+
if options[:only_executables] then
installer.generate_bin
else