1 |
On Tuesday 21 July 2009 06:13:25 Steven J Long wrote: |
2 |
> Nikos Chantziaras wrote: |
3 |
> > Thanks. I ended up doing it this way, though with only one loop in |
4 |
> > src_install(), which seems to be a bit more efficient and shorter: |
5 |
> > |
6 |
> > |
7 |
> > LANGUAGES="de" |
8 |
> > for i in ${LANGUAGES}; do |
9 |
> > IUSE="${IUSE} linguas_${i}" |
10 |
> > done |
11 |
> |
12 |
> Just on a side-note (not saying it's how you want to do this one), this is |
13 |
> something that BASH arrays are nice for (saving another loop): |
14 |
> $ foo=(bar baz quux) |
15 |
> $ echo "prefixed: '${foo[*]/#/pfx_}'" |
16 |
> prefixed: 'pfx_bar pfx_baz pfx_quux' |
17 |
|
18 |
printf would probably be better as it is typically a shell builtin and it |
19 |
doesnt require use of arrays/uncommon syntax. |
20 |
media-gfx/exiv2/exiv2-0.18.ebuild: |
21 |
IUSE_LINGUAS="de es fi fr pl ru sk" |
22 |
IUSE="${IUSE} $(printf 'linguas_%s ' ${IUSE_LINGUAS})" |
23 |
-mike |