On 8/3/06, Dominique Devienne <[EMAIL PROTECTED]> wrote:
> And as far as I know, there is no reasonable iterator or foreach way
> to wrap up a single symlink task within the fileset.

There is. Ant-Contrib's excellent <for> task. But in your case, since
<symlink> is forking's the OS's ln command anyway, I'd use <apply
executable="ln">, which is an implicit for-loop, works with fileset,
and should give you enough control on the command line. --DD

Super!  Thanks very much.  So the task I want turns out to be:

 <macrodef name="symlinkFileset">
   <attribute name="fsRefid"/>
   <attribute name="destdir"/>
   <sequential>
     <apply executable="ln" dest="@{destdir}"  dir="@{destdir}">
       <arg value="-s"/>
       <arg value="-f"/>
       <arg value="--backup"/>
       <mapper type="flatten"/>
       <fileset refid="@{fsRefid}"/>
     </apply>
   </sequential>
 </macrodef>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to