ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tommy Nordgren <tommy.nordg...@chello.se>
Subject Re: Detecting what OS you are running...
Date Fri, 24 Feb 2006 00:07:06 GMT

On 24 feb 2006, at 00.00, JG wrote:

> Hi,
>
> I am writing an ANT config script that is to be used on multiple  
> platforms
> (Windows XP, Mac, Fedora) and I have a target that I want to run a  
> certain
> way for Windows XP and another way for other OS's.
>
> Is there a way to make a target run only for a given OS?
>
> thanks,
> joe
>

<condition property="isDarwin">
	<equals arg1="Mac OS X" arg2="${os.name}" />
</condition>

<target name="darwinTarget" if="isDarwin">
...
</target>

-------------------------------------
This sig is dedicated to the advancement of Nuclear Power
Tommy Nordgren
tommy.nordgren@chello.se




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


Mime
View raw message