ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rebhan, Gilbert" <Gilbert.Reb...@huk-coburg.de>
Subject RE: task to 'cp -r --reply=no'
Date Tue, 12 Jun 2007 08:29:38 GMT

Hi,

-----Original Message-----
From: Chris Velevitch [mailto:chris.velevitch@gmail.com] 
Sent: Tuesday, June 12, 2007 10:12 AM
To: Ant Users List
Subject: Re: task to 'cp -r --reply=no'

/*
The copy task states "By default, files are only copied if the source
file is newer than the destination file, or when the destination file
does not exist", but in my case I only want to copy files if "the
destination file does not exist".
*/

combine it with a condition, example =

<!-- Check ob Modul bereits verarbeitet -->
<target name="check_erl">
   <condition property="${mname}.done">
     <available file="${ant.working.dir}/${mname}_script.params" />
   </condition>
 </target>

and make your copy target depend on the target with condtion and unless

<!-- Subroutine fuer Module mit Liefertyp build -->
<target name="build" depends="check_erl" unless="${mname}.done">
...
</target>


Regards, Gilbert

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


Mime
View raw message