ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <ste...@apache.org>
Subject Re: rexec and setting env variables on remote host
Date Mon, 28 Jan 2008 10:39:56 GMT
Z W wrote:
> Hi
> 
> I tried using rexec task to invoke a shell script.
> 
> <rexec userid="${aname}"
>            password="${apass}"
>            server="${host}"
>            command="cd ${i_dir}; echo $A_HOME $JDK_HOME" />
> 
> The output is as follows:
>     [rexec] /af/gord
>     [echo]
> 
> But when I check the local host of this unix box, the variables are set in
> .profile. When echoed, they are displayed.
> 
> How do I make sure the shell sets these variables in Ant script using rexec
> ? source command isn't available on the unix box.
> 

You've just dropped out of the ant world into the remote linux world.

* You only get stuff in .profile, .cshrc or whatever if you get  a login 
prompt, and by default SSH prompts and other remote connections arent.

* I think its an SSH option to turn this back on. Otherwise run bash 
-login to run bash as a login


-- 
Steve Loughran                  http://www.1060.org/blogxter/publish/5
Author: Ant in Action           http://antbook.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message