diff options
author | 2012-01-05 22:45:00 +0100 | |
---|---|---|
committer | 2012-01-05 22:45:00 +0100 | |
commit | 3c45830469dbff343b9fdb1193b8369c311ed4f1 (patch) | |
tree | 7d237c97d8cab4927d47e6b6937bb780b5486ecc /eselect-ruby | |
parent | Drop ancient versions long gone from the tree. (diff) | |
download | ruby-scripts-3c45830469dbff343b9fdb1193b8369c311ed4f1.tar.gz ruby-scripts-3c45830469dbff343b9fdb1193b8369c311ed4f1.tar.bz2 ruby-scripts-3c45830469dbff343b9fdb1193b8369c311ed4f1.zip |
More Prefix support, bug 396701.
Also, it's 2012.
Diffstat (limited to 'eselect-ruby')
-rw-r--r-- | eselect-ruby/ruby.eselect | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/eselect-ruby/ruby.eselect b/eselect-ruby/ruby.eselect index 5f48eb4..b237917 100644 --- a/eselect-ruby/ruby.eselect +++ b/eselect-ruby/ruby.eselect @@ -1,16 +1,16 @@ -# Copyright 1999-2010 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 DESCRIPTION="Manage Ruby symlinks" MAINTAINER="a3li@gentoo.org" -SVN_DATE="20110306" -VERSION="20110306" +SVN_DATE="20120105" +VERSION="20120105" bindir=/usr/bin man1dir=/usr/share/man/man1 find_targets() { - for t in ${ROOT}${bindir}/${1:-ruby}{18,19,20,ee18} ; do + for t in ${EROOT}${bindir}/${1:-ruby}{18,19,20,ee18} ; do [[ -e $t ]] || continue echo ${t} done @@ -32,7 +32,7 @@ check_target() { fi # `rubyXX' string else - [[ -e "${ROOT}${bindir}/${target}" ]] || \ + [[ -e "${EROOT}${bindir}/${target}" ]] || \ target="invalid" fi @@ -40,14 +40,14 @@ check_target() { } remove_symlinks() { - rm -f ${ROOT}${bindir}/{ruby,gem,irb,erb,ri,rdoc,testrb} && \ - rm -f ${ROOT}${man1dir}/ruby.{1,1.gz,1.bz2,1.lzma} + rm -f ${EROOT}${bindir}/{ruby,gem,irb,erb,ri,rdoc,testrb} && \ + rm -f ${EROOT}${man1dir}/ruby.{1,1.gz,1.bz2,1.lzma} } create_man_symlinks() { local version=${1} - for m in ${ROOT}${man1dir}/ruby${version}.{1,1.gz,1.bz2,1.lzma} + for m in ${EROOT}${man1dir}/ruby${version}.{1,1.gz,1.bz2,1.lzma} do if [[ -e ${m} ]] ; then break @@ -63,7 +63,7 @@ create_symlinks() { version=${target##*ruby} - local path="${ROOT}${bindir}/" + local path="${EROOT}${bindir}/" # these have to work for f in "ruby" "irb" "erb" "ri" "testrb" "rdoc" ; do ln -s "${f}${version}" "${path}${f}" || \ @@ -98,23 +98,23 @@ do_show() { local rb="" write_list_start "Current Ruby version:" - if [[ -L "${ROOT}${bindir}/ruby" ]] ; then - rb=$(basename $(canonicalise ${ROOT}${bindir}/ruby ) ) + if [[ -L "${EROOT}${bindir}/ruby" ]] ; then + rb=$(basename $(canonicalise ${EROOT}${bindir}/ruby ) ) write_kv_list_entry $rb "" - elif [[ -e "${ROOT}${bindir}/ruby" ]] ; then + elif [[ -e "${EROOT}${bindir}/ruby" ]] ; then write_warning_msg "${bindir}/ruby is a SLOT incompatible version." - write_kv_list_entry "$(basename $(canonicalise ${ROOT}${bindir}/ruby ) )" "" + write_kv_list_entry "$(basename $(canonicalise ${EROOT}${bindir}/ruby ) )" "" else write_kv_list_entry "(none)" return 1 fi write_list_start "Current Rubygems version:" - if [[ -L "${ROOT}${bindir}/gem" ]] ; then - write_kv_list_entry "$(basename $(canonicalise ${ROOT}${bindir}/gem ) )" "" - elif [[ -e "${ROOT}${bindir}/gem" ]] ; then + if [[ -L "${EROOT}${bindir}/gem" ]] ; then + write_kv_list_entry "$(basename $(canonicalise ${EROOT}${bindir}/gem ) )" "" + elif [[ -e "${EROOT}${bindir}/gem" ]] ; then write_warning_msg "${bindir}/gem is a SLOT incompatible version." - write_kv_list_entry "$(basename $(canonicalise ${ROOT}${bindir}/gem) )" "" + write_kv_list_entry "$(basename $(canonicalise ${EROOT}${bindir}/gem) )" "" else write_kv_list_entry "gem??" "(not found)" fi @@ -139,7 +139,7 @@ do_list() { fi # find out the current version - if [[ ${targets[i]} = $(canonicalise "${ROOT}${bindir}/ruby") ]] ; then + if [[ ${targets[i]} = $(canonicalise "${EROOT}${bindir}/ruby") ]] ; then targets[i]=$(highlight_marker "${line}") else targets[i]=${line} @@ -183,7 +183,7 @@ do_cleanup() { [[ -z ${@} ]] || die -q "This function does not expect any arguments" # Do we need to clean up? - if [[ -e "${ROOT}${bindir}"/$(readlink "${ROOT}${bindir}/ruby") ]]; then + if [[ -e "${EROOT}${bindir}"/$(readlink "${EROOT}${bindir}/ruby") ]]; then echo "Nothing to clean up." return fi |