summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2010-02-28 18:52:01 +0000
committerUlrich Müller <ulm@gentoo.org>2010-02-28 18:52:01 +0000
commit07bba40cd6ac678ca02063c535f577b83f14965e (patch)
tree1b2ac53406955243b5d2268d73502f037d0d23e5 /app-admin/eselect-ecj/files
parentppc stable #305657 (diff)
downloadgentoo-2-07bba40cd6ac678ca02063c535f577b83f14965e.tar.gz
gentoo-2-07bba40cd6ac678ca02063c535f577b83f14965e.tar.bz2
gentoo-2-07bba40cd6ac678ca02063c535f577b83f14965e.zip
Add support for brief output mode, bug 292101. Remove intermediate version.
(Portage version: 2.2_rc63/cvs/Linux i686)
Diffstat (limited to 'app-admin/eselect-ecj/files')
-rw-r--r--app-admin/eselect-ecj/files/ecj-0.5.eselect (renamed from app-admin/eselect-ecj/files/ecj-0.4.eselect)33
1 files changed, 11 insertions, 22 deletions
diff --git a/app-admin/eselect-ecj/files/ecj-0.4.eselect b/app-admin/eselect-ecj/files/ecj-0.5.eselect
index 196c111ffcb5..ba09435952e8 100644
--- a/app-admin/eselect-ecj/files/ecj-0.4.eselect
+++ b/app-admin/eselect-ecj/files/ecj-0.5.eselect
@@ -1,10 +1,11 @@
+# -*-eselect-*- vim: ft=eselect
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Id: ecj-0.4.eselect,v 1.1 2010/02/28 18:11:03 abcd Exp $
+# $Id: ecj-0.5.eselect,v 1.1 2010/02/28 18:52:00 ulm Exp $
DESCRIPTION="Manage ECJ targets"
-MAINTAINER="chewi@aura-online.co.uk"
-VERSION="0.4"
+MAINTAINER="java@gentoo.org"
+VERSION="0.5"
ECJ="${EROOT}/usr/bin/ecj"
@@ -24,7 +25,7 @@ find_target() {
if is_number "${target}" && [[ ${target} -ge 1 ]] ; then
targets=( $(find_targets ) )
[[ -z "${targets}" ]] && die -q "No targets found!"
- target=${targets[$(( ${target} - 1 ))]}
+ target=${targets[target-1]}
fi
if [[ "${target}" = ecj-[0-9]* ]] && [[ -f "${EROOT}/usr/bin/${target}" ]] ; then
@@ -90,23 +91,13 @@ do_list() {
local i targets
targets=( $(find_targets) )
- if [[ -n ${targets[@]} ]] ; then
- local canonicalised basename
-
- for (( i = 0 ; i < ${#targets[@]} ; i = i + 1 )) ; do
- canonicalised=$(canonicalise "${ECJ}")
- basename=$(basename "${canonicalised}")
-
- if [[ "${targets[${i}]}" = "${basename}" ]] ; then
- targets[${i}]="${targets[${i}]} $(highlight '*')"
- fi
- done
+ for (( i = 0; i < ${#targets[@]}; i++ )); do
+ [[ ${targets[i]} = $(basename "$(canonicalise "${ECJ}")") ]] \
+ && targets[i]=$(highlight_marker "${targets[i]}")
+ done
- write_list_start "Available ECJ targets:"
- write_numbered_list "${targets[@]}"
- else
- write_kv_list_entry "(none found)" ""
- fi
+ write_list_start "Available ECJ targets:"
+ write_numbered_list -m "(none found)" "${targets[@]}"
}
### set action ###
@@ -183,5 +174,3 @@ do_update() {
fi
fi
}
-
-# vim: set ft=eselect :