ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <>
Subject Re: How to know current OS with If condition
Date Fri, 22 Feb 2002 03:37:40 GMT
--- HkPandey <> wrote:
> How can I know that on which os I m running the ant utility.

It's ${}.

> and second is that according to OS I want to use the <target> tag. How
> can it be possible through ant.

You can't with <target> -- it only allows for if/unless, and they only
check for set/not-set, which will always come up set, if you do it with
if="".  However, some tasks have OS-type attributes (eg., the
<exec> task has the 'os' attribute), and the <condition> task can be used
to set (or not) a property based on an OS "family".

To be more specific, we'd need to know what you want to use the value of
your OS for.



Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message