diff options
author | Michał Górny <mgorny@gentoo.org> | 2013-03-10 21:00:29 +0000 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2013-03-10 21:00:29 +0000 |
commit | cc6b3a2e0f381275588340eb384057c92da5b319 (patch) | |
tree | 3b6941a6533c16b1abed8e0125ad26355d117750 /eclass/multibuild.eclass | |
parent | Fix root offset support for bug #458156, thanks to smkbot. (diff) | |
download | historical-cc6b3a2e0f381275588340eb384057c92da5b319.tar.gz historical-cc6b3a2e0f381275588340eb384057c92da5b319.tar.bz2 historical-cc6b3a2e0f381275588340eb384057c92da5b319.zip |
Fix compatibility with bash-4.1 -- it does not support negative array subscripts.
Diffstat (limited to 'eclass/multibuild.eclass')
-rw-r--r-- | eclass/multibuild.eclass | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/eclass/multibuild.eclass b/eclass/multibuild.eclass index bc510e999863..193c20a4411e 100644 --- a/eclass/multibuild.eclass +++ b/eclass/multibuild.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/multibuild.eclass,v 1.6 2013/03/10 09:05:32 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/multibuild.eclass,v 1.7 2013/03/10 21:00:29 mgorny Exp $ # @ECLASS: multibuild # @MAINTAINER: @@ -201,7 +201,10 @@ multibuild_for_best_variant() { [[ ${MULTIBUILD_VARIANTS} ]] \ || die "MULTIBUILD_VARIANTS need to be set" - local MULTIBUILD_VARIANTS=( "${MULTIBUILD_VARIANTS[-1]}" ) + # bash-4.1 can't handle negative subscripts + local MULTIBUILD_VARIANTS=( + "${MULTIBUILD_VARIANTS[$(( ${#MULTIBUILD_VARIANTS[@]} - 1 ))]}" + ) multibuild_foreach_variant "${@}" } |