ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From de...@epiphany.com
Subject RE: Cross-platform properties?
Date Wed, 09 May 2001 22:28:38 GMT
You can use the system property os.name i.e.

   <property name="is.${os.name}" value="true"/>

   <target name="Sun" if="is.SunOS">
   </target>

> -----Original Message-----
> From: Mark Jaffe [mailto:mjaffe@eturn.com]
> Sent: Wednesday, May 09, 2001 3:14 PM
> To: ant-user@jakarta.apache.org
> Subject: Cross-platform properties?
> 
> 
> I am working with a project that needs to work on both unix 
> and NT. IUs
> there an easy way to set properties that will know their 
> platform? I need
> something like
> 
> <property name="home" value="/home/user" if-os="unix"/>
> <property name="home" value="c:\winnt\profiles\user" if-os="windows"/>
> 

Mime
View raw message