/[gentoo-x86]/eclass/eutils.eclass
Gentoo

Diff of /eclass/eutils.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.105 Revision 1.106
1# Copyright 1999-2004 Gentoo Foundation 1# Copyright 1999-2004 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.105 2004/09/19 21:36:46 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.106 2004/09/21 17:34:33 wolf31o2 Exp $
4# 4#
5# Author: Martin Schlemmer <azarah@gentoo.org> 5# Author: Martin Schlemmer <azarah@gentoo.org>
6# 6#
7# This eclass is for general purpose functions that most ebuilds 7# This eclass is for general purpose functions that most ebuilds
8# have to implement themselves. 8# have to implement themselves.
1125 [ ! -f "${lic}" ] && die "Could not find requested license ${src}" 1125 [ ! -f "${lic}" ] && die "Could not find requested license ${src}"
1126 local l="`basename ${lic}`" 1126 local l="`basename ${lic}`"
1127 1127
1128 # here is where we check for the licenses the user already 1128 # here is where we check for the licenses the user already
1129 # accepted ... if we don't find a match, we make the user accept 1129 # accepted ... if we don't find a match, we make the user accept
1130 local shopts=$-
1130 local alic 1131 local alic
1132 set -o noglob #so that bash doesn't expand "*"
1131 for alic in ${ACCEPT_LICENSE} ; do 1133 for alic in ${ACCEPT_LICENSE} ; do
1132 [ "${alic}" == "*" ] && return 0 1134 if [[ ${alic} == * || ${alic} == ${l} ]]; then
1133 [ "${alic}" == "${l}" ] && return 0 1135 set +o noglob; set -${shopts} #reset old shell opts
1136 return 0
1137 fi
1134 done 1138 done
1139 set +o noglob; set -$shopts #reset old shell opts
1135 1140
1136 local licmsg="`mymktemp ${T}`" 1141 local licmsg="`mymktemp ${T}`"
1137 cat << EOF > ${licmsg} 1142 cat << EOF > ${licmsg}
1138********************************************************** 1143**********************************************************
1139The following license outlines the terms of use of this 1144The following license outlines the terms of use of this

Legend:
Removed from v.1.105  
changed lines
  Added in v.1.106

  ViewVC Help
Powered by ViewVC 1.1.20