--- Ken Gentle <[EMAIL PROTECTED]> wrote:
> Just for the record, the word is "purist" - Mary,
> Mother of Jesus, is
> reported to have be "the purest". :)
Hmm. Purism regarding use of the word "purist". We
may end up with another "misspelt is misspelled"
argument on our hands. I do agree your tone, CC, was
getting a little heated. Anyway, take a look at the
attached, 100% pure Ant (1.6.5) buildfile to see some
ideas you might have missed.
HTH,
Matt
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
<project default="copyforclifton">
<property name="comma-d-list" value="t,u,v,w,x,y,z" />
<property name="src.dir" location="foo" />
<property name="dest.dir" location="bar" />
<target name="setup">
<touch verbose="false" mkdirs="true">
<filelist dir="${src.dir}/t" files="a,b,c,d,e,f" />
</touch>
<touch verbose="false" mkdirs="true">
<filelist dir="${src.dir}/u" files="a,b,c,d,e,f" />
</touch>
<touch verbose="false" mkdirs="true">
<filelist dir="${src.dir}/v" files="a,b,c,d,e,f" />
</touch>
<touch verbose="false" mkdirs="true">
<filelist dir="${src.dir}/w" files="a,b,c,d,e,f" />
</touch>
<touch verbose="false" mkdirs="true">
<filelist dir="${src.dir}/x" files="a,b,c,d,e,f" />
</touch>
<touch verbose="false" mkdirs="true">
<filelist dir="${src.dir}/y" files="a,b,c,d,e,f" />
</touch>
<touch verbose="false" mkdirs="true">
<filelist dir="${src.dir}/z" files="a,b,c,d,e,f" />
</touch>
<property name="expectedfiles" value="42" />
<pathconvert property="includes" pathsep=",">
<path>
<dirset dir="${src.dir}" includes="${comma-d-list}" />
</path>
<chainedmapper>
<!-- could be a flattenmapper if you know it's one level -->
<globmapper from="${src.dir}/*" to="*" handledirsep="true" />
<regexpmapper from="^.*$" to="\0/**" />
</chainedmapper>
</pathconvert>
<fileset id="srcfiles" dir="${src.dir}" includes="${includes}" />
<pathconvert property="flatsrc" refid="srcfiles" pathsep="">
<flattenmapper />
</pathconvert>
<fail>
<condition>
<length string="${flatsrc}" when="ne" length="${expectedfiles}" />
</condition>
</fail>
</target>
<target name="copyforclifton" depends="setup">
<copy todir="${dest.dir}">
<fileset refid="srcfiles" />
</copy>
<pathconvert property="flatdest" pathsep="">
<path>
<fileset dir="${dest.dir}" includes="${includes}" />
</path>
<flattenmapper />
</pathconvert>
<fail>
<condition>
<length string="${flatdest}" when="ne" length="${expectedfiles}" />
</condition>
</fail>
</target>
<target name="clean">
<delete dir="${src.dir}" />
<delete dir="${dest.dir}" />
</target>
</project>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]