summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2012-11-18 08:29:17 +0000
committerMike Frysinger <vapier@gentoo.org>2012-11-18 08:29:17 +0000
commit7b3431d6175440f3867c440284df48da41b947a3 (patch)
tree589e6da6f5912a9d8ac57237e1f697f4c7556f32 /eclass/flag-o-matic.eclass
parentBump dataenc to 0.14.0.4 (diff)
downloadhistorical-7b3431d6175440f3867c440284df48da41b947a3.tar.gz
historical-7b3431d6175440f3867c440284df48da41b947a3.tar.bz2
historical-7b3431d6175440f3867c440284df48da41b947a3.zip
test-flags-PROG: use arrays to simplify code a bit
Diffstat (limited to 'eclass/flag-o-matic.eclass')
-rw-r--r--eclass/flag-o-matic.eclass12
1 files changed, 6 insertions, 6 deletions
diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass
index f5f7720674d8..5e6af23468fc 100644
--- a/eclass/flag-o-matic.eclass
+++ b/eclass/flag-o-matic.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.182 2012/11/18 08:27:00 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.183 2012/11/18 08:29:17 vapier Exp $
# @ECLASS: flag-o-matic.eclass
# @MAINTAINER:
@@ -422,21 +422,21 @@ test-flag-FC() { test-flag-PROG "FC" f95 "$1"; }
test-flags-PROG() {
local comp=$1
- local flags
+ local flags=()
local x
shift
[[ -z ${comp} ]] && return 1
- for x in "$@" ; do
- test-flag-${comp} "${x}" && flags="${flags}${flags:+ }${x}"
+ for x ; do
+ test-flag-${comp} "${x}" && flags+=( "${x}" )
done
- echo "${flags}"
+ echo "${flags[*]}"
# Just bail if we dont have any flags
- [[ -n ${flags} ]]
+ [[ ${#flags[@]} -gt 0 ]]
}
# @FUNCTION: test-flags-CC