1 |
On Wednesday 19 October 2011 14:05:50 Mike Frysinger wrote: |
2 |
> now that we have "in_iuse" in eutils.eclass (with all the caveats), i'll be |
3 |
> adding huse: |
4 |
> huse() { |
5 |
> in_iuse $1 || return 1 |
6 |
> use $1 |
7 |
> } |
8 |
|
9 |
actually, after posting this, "iuse" is probably a better name. "huse" came |
10 |
up because the code constructs i was using before was like: |
11 |
has foo ${IUSE} && use foo && ..... |
12 |
which collapses into: |
13 |
h[as foo ${IUSE} && ]use foo && ... |
14 |
huse foo && ... |
15 |
|
16 |
so new proposal for those who love 1 liners: |
17 |
iuse() { in_iuse $1 && use $1 || return 1 ; } |
18 |
-mike |