Not sure if this is the right forum, but here goes.
I'm trying to build an Ant task to remove all temporary files from the
source tree before commiting it back to cvs. The way I would think it was
natural to do this is something along the following lines:
<target name="clean">
<delete src="${srcdir}" includes="**/*~,**/*.bak,**/*.swp"/>
</target>
Alas neither the delete or deltree tags works like this (deleting specific
types of files from the tree).
So I'm doing it this way
<target name="clean">
<mkdir dir="cleansrc" />
<copydir src="${srcdir}" dest="cleansrc" defaultexcludes="no"
excludes="**/*~,**/*.bak,**/*.swp"/>
<deltree dir="${srcdir}" />
<mkdir dir="${srcdir}" />
<copydir src="cleansrc" dest="${srcdir}" defaultexcludes="no"
includes="**"
/>
<deltree dir="cleansrc" />
</target>
Which I'm sure you'll agree is unwieldy?
Is anyone else having this problem? Need this feature? I'm sure it would be
quite easy to add quickly for an Ant guru.
Mike