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

Diff of /eclass/eutils.eclass

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

Revision 1.63 Revision 1.64
1# Copyright 1999-2003 Gentoo Technologies, Inc. 1# Copyright 1999-2003 Gentoo Technologies, Inc.
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.63 2003/10/13 15:00:19 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.64 2003/10/13 15:12:15 vapier 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.
992 elif [ -e "${src}" ] ; then 992 elif [ -e "${src}" ] ; then
993 lic="${src}" 993 lic="${src}"
994 fi 994 fi
995 fi 995 fi
996 [ ! -f "${lic}" ] && die "Could not find requested license ${src}" 996 [ ! -f "${lic}" ] && die "Could not find requested license ${src}"
997 local l="`basename ${lic}`"
997 998
998 # here is where we check for the licenses the user already 999 # here is where we check for the licenses the user already
999 # accepted ... if we don't find a match, we make the user accept 1000 # accepted ... if we don't find a match, we make the user accept
1000 local alic 1001 local alic
1001 for alic in "${ACCEPT_LICENSE}" ; do 1002 for alic in ${ACCEPT_LICENSE} ; do
1002 [ "${alic}" == "*" ] && return 0 1003 [ "${alic}" == "*" ] && return 0
1003 [ "${alic}" == "${lic}" ] && return 0 1004 [ "${alic}" == "${l}" ] && return 0
1004 done 1005 done
1005 1006
1006 local licmsg="`mymktemp ${T}`" 1007 local licmsg="`mymktemp ${T}`"
1007 cat << EOF > ${licmsg} 1008 cat << EOF > ${licmsg}
1008********************************************************** 1009**********************************************************
1013********************************************************** 1014**********************************************************
1014 1015
1015EOF 1016EOF
1016 cat ${lic} >> ${licmsg} 1017 cat ${lic} >> ${licmsg}
1017 ${PAGER:-less} ${licmsg} || die "Could not execute pager (${PAGER}) to accept ${lic}" 1018 ${PAGER:-less} ${licmsg} || die "Could not execute pager (${PAGER}) to accept ${lic}"
1018 einfon "Do you accept the terms of this license? [yes/no] " 1019 einfon "Do you accept the terms of this license (${l})? [yes/no] "
1019 read alic 1020 read alic
1020 case ${alic} in 1021 case ${alic} in
1021 yes|Yes|y|Y) 1022 yes|Yes|y|Y)
1022 return 0 1023 return 0
1023 ;; 1024 ;;

Legend:
Removed from v.1.63  
changed lines
  Added in v.1.64

  ViewVC Help
Powered by ViewVC 1.1.20