From ab5ceccd8f460b755a2d7be0a202518bb3daebbf Mon Sep 17 00:00:00 2001 From: Aron Griffis Date: Sat, 7 Aug 2004 04:24:41 +0000 Subject: make is-flag work for globs --- eclass/flag-o-matic.eclass | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'eclass/flag-o-matic.eclass') diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass index 2700db68fe3a..83a069b998ac 100644 --- a/eclass/flag-o-matic.eclass +++ b/eclass/flag-o-matic.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/flag-o-matic.eclass,v 1.66 2004/07/28 02:18:38 lv Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.67 2004/08/07 04:24:41 agriffis Exp $ # # Author Bart Verwilst @@ -176,7 +176,8 @@ is-flag() { local x for x in ${CFLAGS} ${CXXFLAGS} ; do - if [ "${x}" == "$1" ] ; then + # Note this should work with globs like -mcpu=ultrasparc* + if [[ ${x} == ${1} ]]; then echo true return 0 fi -- cgit v1.2.3-65-gdbad