Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'rbconfig'
- config = defined?(RbConfig) ? RbConfig : Config
- ruby = File.join config::CONFIG['bindir'], config::CONFIG['ruby_install_name']
- ruby << config::CONFIG['EXEEXT']
- cmd = [ruby, 'setup.rb', *ARGV].compact
- cmd[1,0] = "--disable-gems"
- exec(*cmd)
- end
- Dir.chdir File.dirname(__FILE__)
- $:.unshift 'lib'
- require 'rubygems'
- require 'rubygems/gem_runner'
- require 'rubygems/exceptions'
- Gem::CommandManager.instance.register_command :setup
- args = ARGV.clone
- if ENV["GEM_PREV_VER"]
- args = [ '--previous-version', ENV["GEM_PREV_VER"] ] + args
- end
- args.unshift 'setup'
- begin
- Gem::GemRunner.new.run args
- rescue Gem::SystemExitException => e
- exit e.exit_code
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement