blob: b336ea81ad8ce54c09fb56030ad6492431d2af38 [file] [log] [blame]
<?xml version="1.0"?>
<project name="project">
<condition property="legal.directory">
<matches pattern="^/[^/]+/.*" string="${directory}"/>
</condition>
<target name="do.clear.directory" if="legal.directory">
<delete includeemptydirs="true" quiet="true">
<fileset dir="${directory}" includes="**/*" defaultexcludes="false"/>
</delete>
</target>
<target name="dont.clear.directory" unless="legal.directory">
<fail message="Directory &quot;${directory}&quot; is invalid"/>
</target>
<target name="clear.directory" depends="do.clear.directory,dont.clear.directory"/>
</project>