Gentoo Archives: gentoo-dev

From: Mike Frysinger <vapier@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: RFD: split out some functions from eutils.eclass?
Date: Wed, 18 Jan 2012 14:49:30
Message-Id: 201201180948.59867.vapier@gentoo.org
In Reply to: Re: [gentoo-dev] Re: RFD: split out some functions from eutils.eclass? by "Michał Górny"
1 On Wednesday 18 January 2012 08:39:04 Michał Górny wrote:
2 > On Wed, 18 Jan 2012 06:22:24 -0500 Mike Frysinger wrote:
3 > > > > # now we see if the user gave use CD_ROOT ...
4 > > > > # if they did, let's just believe them that it's correct
5 > > > > if [[ -n ${CD_ROOT}${CD_ROOT_1} ]] ; then
6 > > > >
7 > > > > local var=
8 > > > > cdcnt=0
9 > > > > while [[ ${cdcnt} -lt ${CDROM_TOTAL_CDS} ]] ; do
10 > > > > ((++cdcnt))
11 > > > > var="CD_ROOT_${cdcnt}"
12 > > > > [[ -z ${!var} ]] && var="CD_ROOT"
13 > > > > if [[ -z ${!var} ]] ; then
14 > > > > eerror "You must either use just
15 > > > > the CD_ROOT" eerror "or specify ALL the CD_ROOT_X variables."
16 > > > > eerror "In this case, you will
17 > > > > need" \ "${CDROM_TOTAL_CDS} CD_ROOT_X
18 > > > > variables." die "could not locate CD_ROOT_${cdcnt}"
19 > > > > fi
20 > > > > done
21 > > > > export CDROM_ROOT=${CD_ROOT_1:-${CD_ROOT}}
22 > > > > einfo "Found CD #${CDROM_CURRENT_CD} root at
23 > > > > ${CDROM_ROOT}"
24 > > >
25 > > > #1. You are using 1 in variable calls, I don't see a reason to use
26 > > > longer ${CDROM_CURRENT_CD} in this one output case.
27 > >
28 > > i don't know what you mean
29 >
30 > einfo "Found CD #1 root at ..."
31
32 *shrug* i preferred the # in the output
33 -mike

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-dev] Re: RFD: split out some functions from eutils.eclass? "Michał Górny" <mgorny@g.o>