The <available task worked. Thanks.
-----Original Message-----
From: Dominique Devienne [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 17, 2008 10:49 AM
To: Ant Users List
Subject: Re: using <exec> to check for tool availability
On Jan 17, 2008 9:20 AM, Buck, Robert <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED] For additional
commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]