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 -- [EMAIL PROTECTED] mailing list