Sha256: 778d18d048ea17806e94dfbb664f0d9c1c29aa0b8b671f0b81178b5ce2bb848f

Contents?: true

Size: 1017 Bytes

Versions: 9

Compression:

Stored size: 1017 Bytes

Contents

#!/usr/bin/env ruby
#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
# See LICENSE.txt for permissions.
#++

require 'rubygems'

if ARGV.include? '-h' or ARGV.include? '--help' then
  puts "rubygems_update [options]"
  puts
  puts "This will install the latest version of RubyGems."
  puts
  puts "\t--version=X.Y\tUpdate rubygems from the X.Y version."
  exit
end

unless ARGV.grep(/--version=([\d\.]*)/).empty? then
  exec "#{Gem.ruby} -S #{$PROGRAM_NAME} _#{$1}_"
end

update_dir = $LOAD_PATH.find { |fn| fn =~ /rubygems-update/ }

if update_dir.nil?
  puts "Error: Cannot find RubyGems Update Path!"
  puts
  puts "RubyGems has already been updated."
  puts "The rubygems-update gem may now be uninstalled."
  puts "E.g.    gem uninstall rubygems-update"
else
  update_dir = File.dirname(update_dir)
  Dir.chdir update_dir
  update_dir =~ /([0-9.]*)$/
  RGVERSION = $1
  puts "Installing RubyGems #{RGVERSION}"
  system "#{Gem.ruby} setup.rb #{ARGV.join(' ')}"
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rubygems-update-1.3.5 bin/update_rubygems
rubygems-update-1.1.0 bin/update_rubygems
rubygems-update-1.1.1 bin/update_rubygems
rubygems-update-1.2.0 bin/update_rubygems
rubygems-update-1.3.1 bin/update_rubygems
rubygems-update-1.3.0 bin/update_rubygems
rubygems-update-1.3.3 bin/update_rubygems
rubygems-update-1.3.2 bin/update_rubygems
rubygems-update-1.3.4 bin/update_rubygems