From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from <gentoo-dev+bounces-26530-garchives=archives.gentoo.org@gentoo.org>) id 1IaSgm-0002Nr-F0 for garchives@archives.gentoo.org; Wed, 26 Sep 2007 08:56:12 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.14.1/8.14.0) with SMTP id l8Q8kABQ016789; Wed, 26 Sep 2007 08:46:10 GMT Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by robin.gentoo.org (8.14.1/8.14.0) with ESMTP id l8Q8giAL011656 for <gentoo-dev@lists.gentoo.org>; Wed, 26 Sep 2007 08:42:44 GMT Received: from gentoo.org (c-67-171-150-177.hsd1.or.comcast.net [67.171.150.177]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTP id 8E25A65592; Wed, 26 Sep 2007 08:42:43 +0000 (UTC) Date: Wed, 26 Sep 2007 01:42:42 -0700 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 Message-ID: <20070926084242.GM22279@supernova> References: <E1IaN9Q-0006Qq-Hx@stork.gentoo.org> <20070926080715.GK22279@supernova> <200709260436.23207.vapier@gentoo.org> Precedence: bulk List-Post: <mailto:gentoo-dev@lists.gentoo.org> List-Help: <mailto:gentoo-dev+help@gentoo.org> List-Unsubscribe: <mailto:gentoo-dev+unsubscribe@gentoo.org> List-Subscribe: <mailto:gentoo-dev+subscribe@gentoo.org> List-Id: Gentoo Linux mail <gentoo-dev.gentoo.org> X-BeenThere: gentoo-dev@gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200709260436.23207.vapier@gentoo.org> User-Agent: Mutt/1.5.16 (2007-06-09) X-Archives-Salt: 798cf141-9bf2-4668-abde-de4c509dda05 X-Archives-Hash: 5f7055e06fb2f44e27e52ece45866123 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