ant-user mailing list archives

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

It's ${os.name}.

> 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="os.name".  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.

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

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


Mime
View raw message