ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From RADEMAKERS Tanguy <tanguy.rademak...@swift.com>
Subject Re: ant variables on win & unix
Date Mon, 02 Feb 2004 14:19:26 GMT
Pete,

The "magic property" you are looking for is os.name

<project name="osname" basedir="." default="echo">
    <target name="echo">
        <echo>${os.name}</echo>
    </target>
</project>

/t

Pete Stokes wrote:

> Hi.
>
> I want to ant to automatically detect which platform I'm running it on 
> (win/linux) and therefore to use a different variable for the deploy 
> target, i.e. in win I'd need to take into account drive names
>
> win: e:/java/deploy/tomcat/webapps/myapp
> linux /usr/local/tomcat/webapps/myapp
>
> Looked at system properties, but cannot figure it out, any help would 
> be greatly appreciated.
>
> Regards,
> Pete.
>
>
>
> *********************************************************************************** 
>
> This email and any files transmitted with it are confidential and 
> intended solely for the use of the individual or entity to whom they 
> are addressed. If you have received this email in error please notify 
> the system manager.
> This footnote also confirms that this email message has been swept by 
> MIMEsweeper for the presence of computer viruses.
> *********************************************************************************** 
>
> For any information on the Quinn Group of Companies please visit :-
>
> http://www.quinn-group.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
>

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


Mime
View raw message