ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jochen Hagenstroem <jochen.hagenstr...@adobe.com>
Subject Re: os detection
Date Mon, 13 Sep 2004 14:51:27 GMT
Thank you.

Here is my solution:
	<target name="os-detection">
		<condition property="isMac">
			<os family="mac"/>
		</condition>	
	</target>
	<target name="Mac" if="isMac" depends="os-detection">
		<echo>MacOS X</echo>
	</target>
	<target name="Win" unless="isMac" depends="os-detection">
		<echo>Win</echo>
	</target>
	<target name="showOS">
		<antcall target="Mac"/>
		<antcall target="Win"/>
	</target>


On Sep 10, 2004, at 16:36, Vadim Kazakov wrote:

> I use the os clause in the condition task.
>
> -----Original Message-----
> From: jacques couzteau [mailto:lists@bitfaeule.net]
> Sent: September 10, 2004 5:17 AM
> To: ant-u@adobe.com; Ant Users List
> Subject: os detection
>
> Hi folks,
>
> Is there an ant-task that returns the OS-type, I want to find out
> wether I'm running on osx or win in order to have a unified build-file.
>
> Thanks in adance
>
> jacques
>
>
> ---------------------------------------------------------------------
> 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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message