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 20:16:33
Message-Id: 201201181516.02794.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 15:14:05 Michał Górny wrote:
2 > On Wed, 18 Jan 2012 14:29:27 -0500 Mike Frysinger wrote:
3 > > On Wednesday 18 January 2012 14:11:14 Michał Górny wrote:
4 > > > On Wed, 18 Jan 2012 09:48:59 -0500 Mike Frysinger wrote:
5 > > > > On Wednesday 18 January 2012 08:39:04 Michał Górny wrote:
6 > > > > > On Wed, 18 Jan 2012 06:22:24 -0500 Mike Frysinger wrote:
7 > > > > > > > > # now we see if the user gave use CD_ROOT ...
8 > > > > > > > > # if they did, let's just believe them that it's
9 > > > > > > > >
10 > > > > > > > > correct if [[ -n ${CD_ROOT}${CD_ROOT_1} ]] ; then
11 > > > > > > > >
12 > > > > > > > > local var=
13 > > > > > > > > cdcnt=0
14 > > > > > > > > while [[ ${cdcnt} -lt ${CDROM_TOTAL_CDS}
15 > > > > > > > >
16 > > > > > > > > ]] ; do ((++cdcnt))
17 > > > > > > > >
18 > > > > > > > > var="CD_ROOT_${cdcnt}"
19 > > > > > > > > [[ -z ${!var} ]] && var="CD_ROOT"
20 > > > > > > > > if [[ -z ${!var} ]] ; then
21 > > > > > > > >
22 > > > > > > > > eerror "You must either
23 > > > > > > > >
24 > > > > > > > > use just the CD_ROOT" eerror "or specify ALL the CD_ROOT_X
25 > > > > > > > > variables." eerror "In this case, you will
26 > > > > > > > > need" \ "${CDROM_TOTAL_CDS} CD_ROOT_X
27 > > > > > > > > variables." die "could not locate CD_ROOT_${cdcnt}"
28 > > > > > > > >
29 > > > > > > > > fi
30 > > > > > > > >
31 > > > > > > > > done
32 > > > > > > > > export CDROM_ROOT=${CD_ROOT_1:-${CD_ROOT}}
33 > > > > > > > > einfo "Found CD #${CDROM_CURRENT_CD} root
34 > > > > > > > >
35 > > > > > > > > at ${CDROM_ROOT}"
36 > > > > > > >
37 > > > > > > > #1. You are using 1 in variable calls, I don't see a reason
38 > > > > > > > to use longer ${CDROM_CURRENT_CD} in this one output case.
39 > > > > > >
40 > > > > > > i don't know what you mean
41 > > > > >
42 > > > > > einfo "Found CD #1 root at ..."
43 > > > >
44 > > > > *shrug* i preferred the # in the output
45 > > >
46 > > > I don't get what you mean. I just say it's pointless to use
47 > > > ${CDROM_CURRENT_CD} here.
48 > >
49 > > in multi cd sets, it keeps thing clearer imo at little cost
50 >
51 > Consdiering that you always use ${CD_ROOT_1}?
52
53 yes. i want to see the disc # and path.
54 -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>