components/ruby/Solaris/scripts/gemri
author April Chin <april.chin@oracle.com>
Mon, 25 Apr 2011 15:05:59 -0700
changeset 199 b87534be1a76
permissions -rw-r--r--
7023222 move ruby to userland 7032819 ruby 1.8.7-p174 needs a newer patch to build against OpenSSL 1.0.0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
199
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
     1
#!/usr/ruby/1.8/bin/ruby
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
     2
#
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
     3
# CDDL HEADER START
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
     4
#
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
     5
# The contents of this file are subject to the terms of the
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
     6
# Common Development and Distribution License (the "License").
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
     7
# You may not use this file except in compliance with the License.
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
     8
#
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
     9
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    10
# or http://www.opensolaris.org/os/licensing.
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    11
# See the License for the specific language governing permissions
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    12
# and limitations under the License.
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    13
#
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    14
# When distributing Covered Code, include this CDDL HEADER in each
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    15
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    16
# If applicable, add the following below this CDDL HEADER, with the
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    17
# fields enclosed by brackets "[]" replaced with your own identifying
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    18
# information: Portions Copyright [yyyy] [name of copyright owner]
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    19
#
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    20
# CDDL HEADER END
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    21
#
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    22
 
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    23
#
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    24
# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    25
#
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    26
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    27
pass_on_args = []
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    28
deprecation_msg =  "WARNING: gemri has been deprecated and will be removed in a future release of Solaris, use 'gem ri' instead. (use '-s' to suppress these warnings)\n\n"
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    29
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    30
if ARGV.empty?
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    31
  print deprecation_msg 
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    32
  sleep 3
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    33
  system("ri") 
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    34
  exit
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    35
end
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    36
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    37
unless (ARGV.include?("-s"))
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    38
  print deprecation_msg 
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    39
  sleep 3
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    40
end
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    41
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    42
ARGV.each do |arg|
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    43
    pass_on_args << arg unless arg == "-s"
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    44
end
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    45
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    46
ENV["GEM_PATH"] = "/var/ruby/1.8/gem_home"
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    47
system("ri", "--gems", *pass_on_args)