~ubuntu-branches/ubuntu/trusty/ruby1.9/trusty

« back to all changes in this revision

Viewing changes to bin/gem

  • Committer: Bazaar Package Importer
  • Author(s): Stephan Hermann
  • Date: 2008-01-24 11:42:29 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20080124114229-jw2f87rdxlq6gp11
Tags: 1.9.0.0-2ubuntu1
* Merge from debian unstable, remaining changes:
  - Robustify check for target_os, fixing build failure on lpia.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/env ruby
 
2
#--
 
3
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
 
4
# All rights reserved.
 
5
# See LICENSE.txt for permissions.
 
6
#++
 
7
 
 
8
require 'rubygems'
 
9
require 'rubygems/gem_runner'
 
10
 
 
11
required_version = Gem::Requirement.new ">= 1.8.2"
 
12
 
 
13
unless required_version.satisfied_by? Gem::Version.new(RUBY_VERSION) then
 
14
  abort "Expected Ruby Version #{required_version}, was #{RUBY_VERSION}"
 
15
end
 
16
 
 
17
# We need to preserve the original ARGV to use for passing gem options
 
18
# to source gems.  If there is a -- in the line, strip all options after
 
19
# it...its for the source building process.
 
20
args = !ARGV.include?("--") ? ARGV.clone : ARGV[0...ARGV.index("--")]
 
21
 
 
22
Gem::GemRunner.new.run args
 
23