ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Otto Perdeck" <otto.perd...@xs4all.nl>
Subject How to check availability of an executable?
Date Mon, 25 Feb 2002 11:46:12 GMT
Hello,

I need to check whether certain executables are available in my Ant build
script. Depending on availability, parts of the build would be executed or
not.

On Unix-likes, I could "exec" a "where <name_of_tool>" and redirect output
to a property. Since "where" is silent when not found, this could work. For
non-Unix boxes, I could (and have done so) create a trivial Java program
that takes PATH and the tool name, and searches for an existing file along
the path.

But this is all very inconvenient. It would be much better if the
<available> task, or the <available> nested element of <condition> would
allow me to test for the availability of any given executable.

Anyone aware of the existence of such an Ant task? Or an alternative way to
express this in Ant?

Thanks a lot

-Otto Perdeck



--
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