Shell scripts can't modify their enviroment.
http://tldp.org/LDP/abs/html/gotchas.html
A script may not export variables back to its parent process, the shell, or to the environment. Just as we learned in biology, a child process can inherit from a parent, but not vice versa
$ cat > eg.sh
export FOO="bar";
^D
$ bash eg.sh
$ echo $FOO;
$
also, the problem is greater, as you have multiple calls of bash
bash 1 -> hg -> bash 2 ( shell script )
-> bash 3 ( env call )
it would be like thinking I could set a variable in one php script and then magically get it with another simply by running one after the other.
Kent Fredric
2008-09-17 22:09:08