diff options
Diffstat (limited to 'eselect-rails')
-rw-r--r-- | eselect-rails/rails.eselect | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/eselect-rails/rails.eselect b/eselect-rails/rails.eselect index 62791e3..afdb80e 100644 --- a/eselect-rails/rails.eselect +++ b/eselect-rails/rails.eselect @@ -1,10 +1,10 @@ -# Copyright 1999-2007 Gentoo Foundation +# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Id: vi.eselect 261 2006-03-30 21:11:55Z kugelfang $ +# $Id$ DESCRIPTION="Manage Ruby on Rails versions" MAINTAINER="graaff@gentoo.org" -SVN_DATE='$Date: 2006-03-30 23:11:55 +0200 (gio, 30 mar 2006) $' +SVN_DATE='$Date: $' VERSION=$(svn_date_to_version "${SVN_DATE}" ) RAILS="${ROOT}/usr/bin/rails" @@ -101,19 +101,14 @@ do_list() { fi local i targets - targets=( $(find_targets ) ) - if [[ -n ${targets[@]} ]] ; then - for (( i = 0 ; i < ${#targets[@]} ; i = i + 1 )) ; do - [[ ${targets[${i}]} = \ - $(basename $(canonicalise ${ROOT}/usr/bin/rails) ) ]] && - targets[${i}]="${targets[${i}]} $(highlight '*')" - - done - write_list_start "Available Ruby on Rails versions:" - write_numbered_list "${targets[@]}" - else - write_kv_list_entry "(none found)" "" - fi + targets=( $(find_targets) ) + for (( i = 0; i < ${#targets[@]}; i++ )); do + [[ ${targets[i]} = \ + $(basename "$(canonicalise "${ROOT}/usr/bin/rails")") ]] \ + && targets[i]=$(highlight_marker "${targets[i]}") + done + write_list_start "Available Ruby on Rails versions:" + write_numbered_list -m "(none found)" "${targets[@]}" } ### set action ### |