From 0f18d5880d1b8837c8a1b649e3727df9ed072f62 Mon Sep 17 00:00:00 2001 From: Chris Gianelloni Date: Tue, 21 Sep 2004 17:34:33 +0000 Subject: Fixing * expansion in check_license and closing bug #63803. --- eclass/eutils.eclass | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'eclass') diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass index 5c53fc11aa7f..fb9d421afe21 100644 --- a/eclass/eutils.eclass +++ b/eclass/eutils.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/eutils.eclass,v 1.105 2004/09/19 21:36:46 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.106 2004/09/21 17:34:33 wolf31o2 Exp $ # # Author: Martin Schlemmer # @@ -1127,11 +1127,16 @@ check_license() { # here is where we check for the licenses the user already # accepted ... if we don't find a match, we make the user accept + local shopts=$- local alic + set -o noglob #so that bash doesn't expand "*" for alic in ${ACCEPT_LICENSE} ; do - [ "${alic}" == "*" ] && return 0 - [ "${alic}" == "${l}" ] && return 0 + if [[ ${alic} == * || ${alic} == ${l} ]]; then + set +o noglob; set -${shopts} #reset old shell opts + return 0 + fi done + set +o noglob; set -$shopts #reset old shell opts local licmsg="`mymktemp ${T}`" cat << EOF > ${licmsg} -- cgit v1.2.3-65-gdbad