1 |
A small update on the workings of this script: |
2 |
I found out that for example: |
3 |
#!/usr/bin/env awk -f |
4 |
doesn't work as the shell (bash and tcsh) seem to split on the first |
5 |
space, and passes "awk -f" as argument to env, which in turn doesn't |
6 |
find a command called "awk -f". |
7 |
|
8 |
I haven't found a solution for this problem yet, but I think that |
9 |
/usr/bin/env is not the solution to our problem here. We either need to |
10 |
write our own version of 'env' that does what we want, or maybe find our |
11 |
way through another program, perhaps a shell like /bin/sh. (I think we |
12 |
need to keep it portable...) |
13 |
|
14 |
|
15 |
Grobian wrote: |
16 |
> |
17 |
> |
18 |
> Brian Harring wrote: |
19 |
>>> The problem with these kinds of scripts is that their portability is |
20 |
>>> not really assured. I dubbed whether I would write a quick C |
21 |
>>> version, but again I stumbled upon the portability question and |
22 |
>>> decided not to do so, because portage, as inner core of Gentoo, |
23 |
>>> should be as much as possible unaffected by environmental |
24 |
>>> differences. Python is (like Java) a solution to that. So, |
25 |
>>> ultimately, this script should be rewritten in Python. |
26 |
>> module, not script is prefered. |
27 |
> |
28 |
> As I said, I'm a python illiterate :) |
29 |
> |
30 |
>> Assuming I actually finish triggers and they don't suck, it'll be a |
31 |
>> passing the func in, not exec'ing a strict. |
32 |
> |
33 |
> hmmm... sounds good. For my understanding, does it mean that the func |
34 |
> could be executed based on (trigger) conditions, like ppc-macos or |
35 |
> PREFIX != "/", pref.userWantsSheBang == True or something like that? |
36 |
> |
37 |
> |
38 |
|
39 |
-- |
40 |
Fabian Groffen |
41 |
Gentoo for Mac OS X |
42 |
-- |
43 |
gentoo-osx@g.o mailing list |