PROOF_INITCMD and 'source <myscript>'

Hi,
in the PROOF documentation at “http://root.cern.ch/drupal/content/controlling-environment-proof-session” the PROOF_INITCMD variable is described.

However the example with setting the PROOF_INITCMD to 'soucre ’ does not work for me,
and ,if I understand the example correctly, this example cannot work.

Do I correctly understand, that this example is meant to work with setup scripts which contain something like:

export MYVAR1=foo
export MYVAR2=bar

Since the proofserver.sh script calls

eval `$PROOF_INITCMD`

A value of source myscript.sh would translate to

Since the output (to stdout) of myscript.sh is empty, this in turn translates to

which has no effect at all (because the command within the backticks is evaluated in a subshell).

Because of this I don’t think that PROOF_INITCMD=“myscript.sh” has a different effect than PROOF_INITCMD=“source myscript.sh”.

However, setting PROOF_INITCMD to “cat myscript.sh” seems to work for me.

Has the behaviour of PROOF changed, since the documentation was written, do I miss something, or is there something non-standard in my setup, that makes the example in the documentation fail for me?

Cheers,
Jörgen

Hi,

Sorry for the late reply.
The example with ‘source’ is indeed not working. Thanks for reporting.
Replacing ‘source’ with ‘cat’ works indeed. I have changed the doc.

For the last example, the script needs to echo the command to be executed, e.g.

echo "export MYVAR=var; export MYVAR2=var2"

G. Ganis