diff options
author | Petteri Räty <betelgeuse@gentoo.org> | 2008-02-16 20:12:58 +0000 |
---|---|---|
committer | Petteri Räty <betelgeuse@gentoo.org> | 2008-02-16 20:12:58 +0000 |
commit | 70b48ea7fb60e884accfbb78cb78c86c7d98b66f (patch) | |
tree | d0002024d6321c3bc55d9cd1e614c51cd570eddc /eclass | |
parent | Make the doxygen dep compile-time only, remove zephyr from the defaults, redu... (diff) | |
download | gentoo-2-70b48ea7fb60e884accfbb78cb78c86c7d98b66f.tar.gz gentoo-2-70b48ea7fb60e884accfbb78cb78c86c7d98b66f.tar.bz2 gentoo-2-70b48ea7fb60e884accfbb78cb78c86c7d98b66f.zip |
Add possibility to use bash arrays for PATCHES.
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/base.eclass | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/eclass/base.eclass b/eclass/base.eclass index 88af00615d54..2d62c33b4189 100644 --- a/eclass/base.eclass +++ b/eclass/base.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/base.eclass,v 1.32 2008/02/12 23:51:51 betelgeuse Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/base.eclass,v 1.33 2008/02/16 20:12:58 betelgeuse Exp $ # # Author Dan Armak <danarmak@gentoo.org> (nowadays retired) # @@ -34,10 +34,17 @@ base_src_unpack() { debug-print-section autopatch debug-print "$FUNCNAME: autopatch: PATCHES=$PATCHES, PATCHES1=$PATCHES1" cd "${S}" - for x in $PATCHES $PATCHES1; do - debug-print "$FUNCNAME: autopatch: patching from ${x}" - epatch ${x} - done + if [[ ${#PATCHES[@]} -gt 1 ]]; then + for x in "${PATCHES[@]}"; do + debug-print "$FUNCNAME: autopatch: patching from ${x}" + epatch "${x}" + done + else + for x in ${PATCHES} ${PATCHES1}; do + debug-print "$FUNCNAME: autopatch: patching from ${x}" + epatch "${x}" + done + fi ;; all) debug-print-section all |