ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Franzen" <nfran...@gmail.com>
Subject using symlink on filesets
Date Thu, 03 Aug 2006 13:38:26 GMT
I'd like to use "symlink" as part of a deploy task on unix machines. I
have a set of files which are most easily specified as a fileset, and
I'd like to create symbolic links in a particular destination
directory to all of the sources.  I could just copy them, as

  <target name="install_copy" >
     <copy todir="${deploy.dir}" flatten="true">
       <fileset refid="sourceFiles"/>
     </copy>
  </target>

but I'd really rather create links with something like

  <target name="install_link" >
     <symlink todir="${deploy.dir}" >
       <fileset refid="sourceFiles"/>
     </copy>
  </target>

But of course the symlink task isn't set up to do this sort of thing.
Instead, it would force me to enumerate each filename and call
<symlink action="single" ... which would be pretty painful.

Or I could rewrite the symlink task so that I could take a filemapper
or some such thing as an argument, i.e. make it more like "copy".  I
would think this generally desirable -- and that I would not have been
the first to think of it.

And as far as I know, there is no reasonable iterator or foreach way
to wrap up a single symlink task within the fileset.

Any suggestions?

-Nate

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


Mime
View raw message