Sha256: 0395fe078e975aeea6b6d3c695299e886913f0fc46def8a22520aac6e51491e1

Contents?: true

Size: 999 Bytes

Versions: 8

Compression:

Stored size: 999 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") || ARGV.include?("--help")
  $stderr.puts "rubygems_update [options]"
  $stderr.puts
  $stderr.puts "This will install the latest version of RubyGems."
  $stderr.puts
  $stderr.puts "\t--version=X.Y\tUpdate RubyGems from the X.Y version."
  exit
end

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

update_dir = $LOAD_PATH.find {|dir| dir =~ /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
  ENV["GEM_PREV_VER"] = Gem::VERSION
  abort unless system(Gem.ruby, "setup.rb", *ARGV)
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rubygems-update-3.3.27 bin/update_rubygems
rubygems-update-3.3.26 bin/update_rubygems
rubygems-update-3.3.25 bin/update_rubygems
rubygems-update-3.3.24 bin/update_rubygems
rubygems-update-3.3.23 bin/update_rubygems
rubygems-update-3.3.22 bin/update_rubygems
rubygems-update-3.3.21 bin/update_rubygems
rubygems-update-3.3.20 bin/update_rubygems