diff options
Diffstat (limited to 'app-admin')
-rw-r--r-- | app-admin/eselect-maven/ChangeLog | 8 | ||||
-rw-r--r-- | app-admin/eselect-maven/eselect-maven-0.2.ebuild (renamed from app-admin/eselect-maven/eselect-maven-0.1-r1.ebuild) | 11 | ||||
-rw-r--r-- | app-admin/eselect-maven/files/maven-0.2.eselect (renamed from app-admin/eselect-maven/files/maven.eselect-1) | 36 |
3 files changed, 23 insertions, 32 deletions
diff --git a/app-admin/eselect-maven/ChangeLog b/app-admin/eselect-maven/ChangeLog index 020f358d750e..7ee743af848b 100644 --- a/app-admin/eselect-maven/ChangeLog +++ b/app-admin/eselect-maven/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for app-admin/eselect-maven # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-maven/ChangeLog,v 1.7 2010/02/26 17:17:37 grobian Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-maven/ChangeLog,v 1.8 2010/02/28 19:31:03 ulm Exp $ + +*eselect-maven-0.2 (28 Feb 2010) + + 28 Feb 2010; Ulrich Mueller <ulm@gentoo.org> -eselect-maven-0.1-r1.ebuild, + +eselect-maven-0.2.ebuild, +files/maven-0.2.eselect, -files/maven.eselect-1: + Add support for brief output mode, bug 292101. Remove intermediate version. *eselect-maven-0.1-r1 (26 Feb 2010) diff --git a/app-admin/eselect-maven/eselect-maven-0.1-r1.ebuild b/app-admin/eselect-maven/eselect-maven-0.2.ebuild index b7d8de7a1c15..1b6653f384f8 100644 --- a/app-admin/eselect-maven/eselect-maven-0.1-r1.ebuild +++ b/app-admin/eselect-maven/eselect-maven-0.2.ebuild @@ -1,12 +1,13 @@ # Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-maven/eselect-maven-0.1-r1.ebuild,v 1.1 2010/02/26 17:17:37 grobian Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-maven/eselect-maven-0.2.ebuild,v 1.1 2010/02/28 19:31:04 ulm Exp $ EAPI=3 DESCRIPTION="Manages Maven symlinks" HOMEPAGE="http://www.gentoo.org/" SRC_URI="" + LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" @@ -21,12 +22,8 @@ PDEPEND=" dev-java/maven-bin:2.0 )" -src_unpack() { - mkdir "${S}" - cp "${FILESDIR}"/maven.eselect-1 "${S}"/maven.eselect || die -} - src_install() { insinto /usr/share/eselect/modules - doins "${S}"/maven.eselect || die + newins "${FILESDIR}/maven-${PV}.eselect" maven.eselect \ + || die "newins failed" } diff --git a/app-admin/eselect-maven/files/maven.eselect-1 b/app-admin/eselect-maven/files/maven-0.2.eselect index af32b0426ee3..caac8be9083b 100644 --- a/app-admin/eselect-maven/files/maven.eselect-1 +++ b/app-admin/eselect-maven/files/maven-0.2.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: maven.eselect-1,v 1.1 2010/02/26 17:17:38 grobian Exp $ +# $Id: maven-0.2.eselect,v 1.1 2010/02/28 19:31:04 ulm Exp $ DESCRIPTION="Manage Maven targets" -MAINTAINER="jieryn@gmail.com" -VERSION="0.1" +MAINTAINER="java@gentoo.org" +VERSION="0.2" MVN="${EROOT}/usr/bin/mvn" @@ -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}" = mvn-[0-9]* ]] && [[ -f "${EROOT}/usr/bin/${target}" ]] ; then @@ -49,8 +50,7 @@ get_target() { set_symlink() { local target=$(find_target "${1}") remove_symlink - ln -s "${target}" "${MVN}" || \ - die "Couldn't set ${target} symlink." + ln -s "${target}" "${MVN}" || die "Couldn't set ${target} symlink." } ### show action ### @@ -90,23 +90,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 "${MVN}") - 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 "${MVN}")") ]] \ + && targets[i]=$(highlight_marker "${targets[i]}") + done - write_list_start "Available Maven targets:" - write_numbered_list "${targets[@]}" - else - write_kv_list_entry "(none found)" "" - fi + write_list_start "Available Maven targets:" + write_numbered_list -m "(none found)" "${targets[@]}" } ### set action ### @@ -183,5 +173,3 @@ do_update() { fi fi } - -# vim: set ft=eselect : |