> From: Mike Ayers
> Sent: Tuesday, February 18, 2003 9:02 AM
> > What is the canonical "Only create this directory if it
> > doesn't exist"
> > rule?
>
> There may not be a canonical form, but this will work:
>
> <condition property="dir.makeme" >
> <available ${dir.name} >
> </condition>
> <mkdir dir=${dir.name} />
This was incorrect - noone noticed? I just caught it on the reread.
Corrected:
========SNIP====8<-----------------------------------------
<!-- This must be a dependency of the top-level target, and
must precede "MakeDirIfNecessary" in the dependency list
-->
<target name="CheckDir">
<condition property="dir.makeme" >
<available ${dir.name} >
</condition>
</target>
<target name="MakeDirIfNecessary" if="dir.makeme" >
<mkdir dir=${dir.name} />
</target>
========SNIP====8<-----------------------------------------
/|/|ike
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]