On Wednesday 26 September 2007, Donnie Berkholz wrote:
> On 04:36 Wed 26 Sep     , Mike Frysinger wrote:
> > On Wednesday 26 September 2007, Donnie Berkholz wrote:
> > > I might define a custom function here to reduce duplication and
> > > increase readability.
> > >
> > > use_linguas() {
> > >   local lingua=$1
> > >   use linguas_${lingua} && ALL_LINGUAS="${ALL_LINGUAS} ${lingua}"
> > > }
> > >
> > > And then..
> > >
> > > use_linguas de
> > > use_linguas en
> > > ...
> >
> > nice ... and to take it a step further:
> > for l in de en ... ; do use_linguas ${l} ; done
>
> And a step farther than that... =)

even nicer

> for USE in ${IUSE}; do
>       [[ ${USE} = linguas_* ]] && use_linguas ${USE}
> done

you dont want to use the variable 'USE' ... while it would work correctly if 
you declared it with 'local', it'd be confusing and repoman may just barf on 
it ($USE is supposed to be readonly for ebuilds)
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to