summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Mueller <ulm@gentoo.org>2009-12-19 09:20:19 +0100
committerAlex Legler <a3li@gentoo.org>2009-12-21 11:43:55 +0100
commitd98c32c615b8179dd5fdb6fbf786a67f920287f6 (patch)
tree58c596e1b84ad73aa93168f6522b31612cf67ecb /eselect-rails
parentRemove packages merged in main tree. (diff)
downloadruby-scripts-d98c32c615b8179dd5fdb6fbf786a67f920287f6.tar.gz
ruby-scripts-d98c32c615b8179dd5fdb6fbf786a67f920287f6.tar.bz2
ruby-scripts-d98c32c615b8179dd5fdb6fbf786a67f920287f6.zip
Support eselect --brief output mode, bug 292113.
Signed-off-by: Ulrich Mueller <ulm@gentoo.org> Signed-off-by: Alex Legler <a3li@gentoo.org>
Diffstat (limited to 'eselect-rails')
-rw-r--r--eselect-rails/rails.eselect27
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 ###