From: Vlastimil Babka Date: Fri, 21 Oct 2011 11:05:01 +0000 (+0000) Subject: Add java-ant_remove-taskdef()s --name parameter that removes only tasks of given... X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=dafccd24cc747cd8d2a1c3b8b06aff7691c6cde3;p=gentoo.git Add java-ant_remove-taskdef()s --name parameter that removes only tasks of given name. Patch by Ralph Sennhauser , bug #387983. --- diff --git a/eclass/java-ant-2.eclass b/eclass/java-ant-2.eclass index 9d148571a9d7..f56cdc07dec6 100644 --- a/eclass/java-ant-2.eclass +++ b/eclass/java-ant-2.eclass @@ -14,7 +14,7 @@ # # Licensed under the GNU General Public License, v2 # -# $Header: /var/cvsroot/gentoo-x86/eclass/java-ant-2.eclass,v 1.51 2011/07/08 11:35:01 ssuominen Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/java-ant-2.eclass,v 1.52 2011/10/21 11:05:01 caster Exp $ inherit java-utils-2 @@ -431,20 +431,28 @@ java-ant_rewrite-classpath() { # ------------------------------------------------------------------------------ # @public java-ant_remove-taskdefs # -# Removes taskdef elements from the file +# Removes (named) taskdef elements from the file. +# Options: +# --name NAME : only remove taskdef with name NAME. # @param $1 - the file to rewrite (defaults to build.xml) # ------------------------------------------------------------------------------ java-ant_remove-taskdefs() { debug-print-function ${FUNCNAME} $* - local file=${1:-build.xml} + local task_name + if [[ "${1}" == --name ]]; then + task_name="${2}" + shift 2 + fi + local file="${1:-build.xml}" echo "Removing taskdefs from ${file}" python <