ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <ste...@apache.org>
Subject Re: Using environment variable in SCP
Date Tue, 18 Mar 2008 10:24:55 GMT
Suhas Majale wrote:
> I am using properties file, in which *solr.home.path=$SOLR_PATH*
> 
> Even it fails when I try with
> 
>  command="cp -rvf /tmp/solr/${webapp.name} $SOLR_PATH"
> or
>  command="cp -rvf /tmp/solr/${webapp.name} $$SOLR_PATH"
> or
> command="cp -rvf /tmp/solr/${webapp.name} $$SOLR_PATH"
> 
> Regards, Suhas M.
> 

The issue here is that when you SSH in, you may not be running a login 
shell (as in bash -login), so env variables set in .bashrc /etc/profile 
may not be set.

1. add an echo $SOLR_PATH to your command list
2. force load whichever file sets the environment variables, with 
something like
   source ~/.bashrc
  (thats the tcsh operation; I dont use bash enough to be sure the 
syntax is correct. It may be
  . ~/.bashrc
3. drive everything from property files in your local system


-- 
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