summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVlastimil Babka <caster@gentoo.org>2013-04-06 10:25:14 +0000
committerVlastimil Babka <caster@gentoo.org>2013-04-06 10:25:14 +0000
commitca4774f587d9d43f022d6e4f51e439bcf1ac8087 (patch)
treea287810dde02ec5f110ae81b633241cbd98e763e /app-admin/eselect-maven/files
parentAdd blockers for upcoming packages related to java-config-2.2, so that they a... (diff)
downloadhistorical-ca4774f587d9d43f022d6e4f51e439bcf1ac8087.tar.gz
historical-ca4774f587d9d43f022d6e4f51e439bcf1ac8087.tar.bz2
historical-ca4774f587d9d43f022d6e4f51e439bcf1ac8087.zip
Add blockers for upcoming packages related to java-config-2.2, so that they are mutual. Remove old.
Package-Manager: portage-2.2.0_alpha171/cvs/Linux x86_64 Manifest-Sign-Key: 0x4E61DE84
Diffstat (limited to 'app-admin/eselect-maven/files')
-rw-r--r--app-admin/eselect-maven/files/maven.eselect187
1 files changed, 0 insertions, 187 deletions
diff --git a/app-admin/eselect-maven/files/maven.eselect b/app-admin/eselect-maven/files/maven.eselect
deleted file mode 100644
index 15f84f3a0279..000000000000
--- a/app-admin/eselect-maven/files/maven.eselect
+++ /dev/null
@@ -1,187 +0,0 @@
-# Copyright 1999-2008 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id: maven.eselect,v 1.1 2009/05/12 19:08:17 ali_bush Exp $
-
-DESCRIPTION="Manage Maven targets"
-MAINTAINER="jieryn@gmail.com"
-VERSION="0.1"
-
-MVN="${ROOT}/usr/bin/mvn"
-
-# find a list of mvn symlink targets, best first.
-find_targets() {
- for f in $(ls -r "${MVN}"-[0-9]* 2> /dev/null) ; do
- if [[ -f "${f}" ]] ; then
- echo $(basename "${f}")
- fi
- done
-}
-
-# get a named or numbered target.
-find_target() {
- local target=${1}
-
- if is_number "${target}" && [[ ${target} -ge 1 ]] ; then
- targets=( $(find_targets ) )
- [[ -z "${targets}" ]] && die -q "No targets found!"
- target=${targets[$(( ${target} - 1 ))]}
- fi
-
- if [[ "${target}" = mvn-[0-9]* ]] && [[ -f "${ROOT}/usr/bin/${target}" ]] ; then
- echo ${target}
- else
- die -q "Target \"${1}\" doesn't appear to be valid!"
- fi
-}
-
-# try to remove the mvn symlink.
-remove_symlink() {
- rm "${MVN}" &>/dev/null
-}
-
-# determine the current target.
-get_target() {
- local canonicalised=$(canonicalise "${MVN}")
- echo $(basename "${canonicalised}")
-}
-
-# set the Maven symlink.
-set_symlink() {
- local target=$(find_target "${1}")
- remove_symlink
- ln -s "${ROOT}/usr/bin/${target}" "${MVN}" || \
- die "Couldn't set ${target} symlink."
-}
-
-### show action ###
-
-describe_show() {
- echo "Show current Maven target"
-}
-
-do_show() {
- if [[ ${#} -gt 0 ]]; then
- die -q "No parameters allowed."
- fi
-
- if [[ -L "${MVN}" ]] ; then
- get_target
- return 0
- elif [[ -e "${MVN}" ]] ; then
- echo "(not a symlink)" >&2
- return 1
- else
- echo "(unset)" >&2
- return 1
- fi
-}
-
-### list action ###
-
-describe_list() {
- echo "List available Maven targets"
-}
-
-do_list() {
- if [[ ${#} -gt 0 ]]; then
- die -q "Usage error: no parameters allowed."
- fi
-
- 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
-
- write_list_start "Available Maven targets:"
- write_numbered_list "${targets[@]}"
- else
- write_kv_list_entry "(none found)" ""
- fi
-}
-
-### set action ###
-
-describe_set() {
- echo "Set a new Maven target"
-}
-
-describe_set_options() {
- echo "target : Target name or number (from 'list' action)"
-}
-
-describe_set_parameters() {
- echo "<target>"
-}
-
-do_set() {
- if [[ $# -gt 1 ]]; then
- die -q "Too many parameters. Expected only one."
- fi
-
- local target=${1}
-
- if [[ -z "${target}" ]] ; then
- die -q "You didn't give me a target name or number."
- elif [[ -L "${MVN}" ]] ; then
- if ! remove_symlink ; then
- die -q "Can't remove existing Maven provider."
- elif ! set_symlink "${1}" ; then
- die -q "Can't set new Maven provider."
- fi
- elif [[ -e "${MVN}" ]] ; then
- write_warning_msg "Can't set a new Maven provider. There's a file in the way at ${MVN}. You can try removing it manually, and then re-running this command."
- else
- set_symlink "${target}" || die -q "Wasn't able to set a new provider."
- fi
-}
-
-### update action ###
-
-describe_update() {
- echo "Set the Maven target to the latest if the current target is invalid or if the given target is the latest"
-}
-
-describe_update_options() {
- echo "target (optional) : Target name (from 'list' action)"
-}
-
-describe_update_parameters() {
- echo "<target>"
-}
-
-do_update() {
- if [[ $# -gt 1 ]] ; then
- die -q "Too many parameters. Expected only one."
- fi
-
- # For pkg_postrm
- if [[ ! $(find_targets) ]]; then
- remove_symlink
- return
- fi
-
- local canonicalised=$(canonicalise "${MVN}")
-
- if [[ ! -L "${MVN}" ]] || [[ ! -f "${canonicalised}" ]] ; then
- do_set 1
- elif [[ -n "${1}" ]] ; then
- # Check whether target name is valid.
- find_target "${1}" > /dev/null
-
- if [[ "${1}" == "$(find_target 1)" ]] ; then
- do_set 1
- fi
- fi
-}
-
-# vim: set ft=eselect :