1 |
-----BEGIN PGP SIGNED MESSAGE----- |
2 |
Hash: SHA1 |
3 |
|
4 |
On Thu, May 14, 2009 at 10:53:37PM +0100, Ciaran McCreesh wrote: |
5 |
> It can't, because it doesn't know the EAPI until it's sourced the thing |
6 |
> using bash. Using things like += in global scope will break older bash |
7 |
> versions to the point that they can't reliably extract EAPI. |
8 |
|
9 |
I just figured out a line in bash that will get an EAPI without |
10 |
sourcing the ebuild: |
11 |
|
12 |
eval `grep '^EAPI=' ebuildfile | head -n 1` |
13 |
|
14 |
will set EAPI in the current scope to EAPI in the ebuild, without |
15 |
sourcing it, unless the issue with something like this would be its use |
16 |
of grep and head, but these are both in the system set, so unless you |
17 |
don't want to depend on the system set, I don't know what the objection |
18 |
would be. |
19 |
|
20 |
- -- |
21 |
William Hubbs |
22 |
gentoo accessibility team lead |
23 |
williamh@g.o |
24 |
-----BEGIN PGP SIGNATURE----- |
25 |
Version: GnuPG v2.0.11 (GNU/Linux) |
26 |
|
27 |
iEYEARECAAYFAkoNxeEACgkQblQW9DDEZThaFACfYSQTpPTxfh3MzvErzbSNGZ8M |
28 |
46AAoIyGTJxbWQ4Be7075uHXYN+hfnDl |
29 |
=X3Wn |
30 |
-----END PGP SIGNATURE----- |