Gentoo Archives: gentoo-dev

From: Mike Frysinger <vapier@g.o>
To: Donnie Berkholz <dberkholz@g.o>
Cc: gentoo-dev@l.g.o, hanno@g.o
Subject: Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in app-doc/gimp-help: ChangeLog gimp-help-0.13.ebuild
Date: Wed, 26 Sep 2007 09:03:57
Message-Id: 200709260451.16087.vapier@gentoo.org
In Reply to: Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in app-doc/gimp-help: ChangeLog gimp-help-0.13.ebuild by Donnie Berkholz
1 On Wednesday 26 September 2007, Donnie Berkholz wrote:
2 > On 04:36 Wed 26 Sep , Mike Frysinger wrote:
3 > > On Wednesday 26 September 2007, Donnie Berkholz wrote:
4 > > > I might define a custom function here to reduce duplication and
5 > > > increase readability.
6 > > >
7 > > > use_linguas() {
8 > > > local lingua=$1
9 > > > use linguas_${lingua} && ALL_LINGUAS="${ALL_LINGUAS} ${lingua}"
10 > > > }
11 > > >
12 > > > And then..
13 > > >
14 > > > use_linguas de
15 > > > use_linguas en
16 > > > ...
17 > >
18 > > nice ... and to take it a step further:
19 > > for l in de en ... ; do use_linguas ${l} ; done
20 >
21 > And a step farther than that... =)
22
23 even nicer
24
25 > for USE in ${IUSE}; do
26 > [[ ${USE} = linguas_* ]] && use_linguas ${USE}
27 > done
28
29 you dont want to use the variable 'USE' ... while it would work correctly if
30 you declared it with 'local', it'd be confusing and repoman may just barf on
31 it ($USE is supposed to be readonly for ebuilds)
32 -mike

Attachments

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

Replies