public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Donnie Berkholz <dberkholz@gentoo.org>
To: Mike Frysinger <vapier@gentoo.org>
Cc: gentoo-dev@lists.gentoo.org, hanno@gentoo.org
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 01:42:42 -0700	[thread overview]
Message-ID: <20070926084242.GM22279@supernova> (raw)
In-Reply-To: <200709260436.23207.vapier@gentoo.org>

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... =)

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

with a slightly different definition of use_linguas(). The benefit of 
this is that you only need to define the available languages in one 
place, so you don't need to worry about them getting out of sync. It 
would be a little more elegant if you had IUSE_LINGUAS, which was then 
included in IUSE, so you didn't need to do that test.

Thanks,
Donnie
-- 
gentoo-dev@gentoo.org mailing list



  reply	other threads:[~2007-09-26  8:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1IaN9Q-0006Qq-Hx@stork.gentoo.org>
2007-09-26  6:17 ` [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in app-doc/gimp-help: ChangeLog gimp-help-0.13.ebuild Christian Faulhammer
2007-09-26  8:07 ` Donnie Berkholz
2007-09-26  8:36   ` Mike Frysinger
2007-09-26  8:42     ` Donnie Berkholz [this message]
2007-09-26  8:51       ` Mike Frysinger
2007-09-26  9:03         ` Donnie Berkholz
2007-09-26  9:14           ` Mike Frysinger
2007-09-26  9:30             ` Donnie Berkholz
2007-09-27  6:33               ` Mike Frysinger
2007-09-27 15:17                 ` Hanno Böck
2007-09-27 15:30               ` [gentoo-dev] " Steve Long

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070926084242.GM22279@supernova \
    --to=dberkholz@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    --cc=hanno@gentoo.org \
    --cc=vapier@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox