mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rubygems: Import RubyGems 2.1
* test/rubygems: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
cd9f9e4719
commit
47f0248b08
113 changed files with 4964 additions and 2610 deletions
|
@ -30,6 +30,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
|
||||
|
||||
|
@ -104,16 +110,21 @@ with extensions.
|
|||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue