ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <DDevie...@lgc.com>
Subject RE: Multiple directory existence checking
Date Tue, 11 May 2004 15:46:09 GMT
> From: Peter Reilly [mailto:peter.reilly@corvil.com]
> <project xmlns:ac="antlib:net.sf.antcontrib">
>   <property name="root" location="src"/>
>   <property name="subdirs" value="a:b:c:d"/>
>   <target name="check.allpresent">
>     <ac:for list="${subdirs}" delimiter=":" param="dir">
>        <ac:sequential>
>           <condition property="not.all.there">
>              <not>
>                <available file="${root}/@{dir}" type="dir"/>
>              </not>
>           </condition>
>       </ac:sequential>
>     </ac:for>
>   </target>
>   <target name="dothetask" depends="check.allpresent"
>           unless="not.all.there">
>     ...
>   </target>
> </project>

I can't top that ;-) Double negation is too clever for me! --DD

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


Mime
View raw message