1 |
Ahh, well, I understand my mistake now. |
2 |
|
3 |
Actually I want to pass ${ECONF_SOURCE}, and the variable could be empty, |
4 |
so NAME="${ECONF_SOURCE}" might be expanded to NAME=, so the environment |
5 |
variable is unset. That's why I've seen a 'missing environment variable' |
6 |
error from the script. |
7 |
|
8 |
Thank you for your advice, and I'm sorry to post such question. |
9 |
|
10 |
2014/1/15 Mike Gilbert <floppym@g.o> |
11 |
|
12 |
> On Mon, Jan 13, 2014 at 10:27 PM, Masanori Ogino |
13 |
> <masanori.ogino@×××××.com> wrote: |
14 |
> > Hello. |
15 |
> > |
16 |
> > I wrote an ebuild and it executes a small Python script bundled in the |
17 |
> > source. The Python script requires a environment variable to be set. |
18 |
> > |
19 |
> > I tried something like: |
20 |
> > |
21 |
> > NAME=value ${ECONF_SOURCE:-.}/script_file.py |
22 |
> > |
23 |
> > and |
24 |
> > |
25 |
> > export NAME=value |
26 |
> > ${ECONF_SOURCE:-.}/script_file.py |
27 |
> > |
28 |
> > but the both fail to pass the parameter via the environment variable to |
29 |
> the |
30 |
> > script. |
31 |
> > |
32 |
> > How can I do it? Please point it out if I overlooked something. |
33 |
> > |
34 |
> |
35 |
> Either of the method you listed about should work. |
36 |
> |
37 |
> Are you sure the script is looking for an environment variable? |
38 |
> |
39 |
> |
40 |
|
41 |
|
42 |
-- |
43 |
Masanori Ogino <masanori.ogino@×××××.com> |
44 |
http://twitter.com/omasanori |
45 |
http://gplus.to/omasanori |