Ahh, well, I understand my mistake now.

Actually I want to pass ${ECONF_SOURCE}, and the variable could be empty,
so NAME="${ECONF_SOURCE}" might be expanded to NAME=, so the environment
variable is unset. That's why I've seen a 'missing environment variable'
error from the script.

Thank you for your advice, and I'm sorry to post such question.

2014/1/15 Mike Gilbert <[email protected]>

> On Mon, Jan 13, 2014 at 10:27 PM, Masanori Ogino
> <[email protected]> wrote:
> > Hello.
> >
> > I wrote an ebuild and it executes a small Python script bundled in the
> > source. The Python script requires a environment variable to be set.
> >
> > I tried something like:
> >
> >     NAME=value ${ECONF_SOURCE:-.}/script_file.py
> >
> > and
> >
> >     export NAME=value
> >     ${ECONF_SOURCE:-.}/script_file.py
> >
> > but the both fail to pass the parameter via the environment variable to
> the
> > script.
> >
> > How can I do it? Please point it out if I overlooked something.
> >
>
> Either of the method you listed about should work.
>
> Are you sure the script is looking for an environment variable?
>
>


-- 
Masanori Ogino <[email protected]>
http://twitter.com/omasanori
http://gplus.to/omasanori

Reply via email to