Sha256: b04ffcac85ad051476fd0b3967e12b812641a7eade43c0b9184799a279d1f536
Contents?: true
Size: 1021 Bytes
Versions: 7
Compression:
Stored size: 1021 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 $stderr.puts "#{Gem::GEM_NAME}_update [options]" $stderr.puts $stderr.puts "This will install the latest version of #{Gem::NAME}." $stderr.puts $stderr.puts "\t--version=X.Y\tUpdate #{Gem::GEM_NAME} from the X.Y version." exit end unless ARGV.grep(/--version=([\d\.]*)/).empty? then exec Gem.ruby, '-S', $PROGRAM_NAME, "_#{$1}_" end update_specs = Gem.source_index.find_name('Gem::GEM_NAME') update_spec = update_specs.sort_by {|s| s.version.to_s }.last if update_spec.nil? puts "Error: Cannot find #{Gem::NAME} Update Path!" puts puts "#{Gem::NAME} has already been updated." puts "The #{Gem::GEM_NAME} gem may now be uninstalled." puts "E.g. gem uninstall #{Gem::GEM_NAME}" else Dir.chdir update_spec.full_gem_path system(Gem.ruby, 'setup.rb', *ARGV) end
Version data entries
7 entries across 7 versions & 1 rubygems