ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominique Devienne" <ddevie...@gmail.com>
Subject Re: using <exec> to check for tool availability
Date Thu, 17 Jan 2008 15:49:20 GMT
On Jan 17, 2008 9:20 AM, Buck, Robert <rbuck@verisign.com> wrote:
> Does anyone have any better suggestions for how to check for tool
> existence in Ant?

<property environment="env" />
<available file="dot" filepath="${env.PATH}" ... />

But you need to know the exact file name (dot or dot.exe), and
env.PATH is not always portable because of case on Windows, where it
can be Path, path, or PATH or else. Your <exec> approach is more
reliable, but more verbose. Maybe a <redirector> in exec would help,
and a "grep" of know output from the command to see if it works or
not. Just suggestions to explore. --DD

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


Mime
View raw message