ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Giroux" <mlgir...@gmail.com>
Subject Re: Deriving something from <srcfile/> from within <apply>
Date Thu, 06 Apr 2006 20:11:36 GMT
If you do not wish to change the utility, you might consider using a script
to achieve the transformation.  The <APPLY> task would specify a shell
script as the executable, and the script would invoke the target utility.
The script itself would be self contained within the build.xml. Something
similar to the following should work.

<project default="go">
<target name="utility.sh">
<echo file="utility.sh" append="false">#!/bin/bash
utility $1 blah$1 $2
</echo>
</target>

<target name="go" depends="utility.sh">
<apply executable="sh">
<!-- sh command switches as args go here -->
<arg value="./utility.sh"/>
<srcfile/>
<mapper type="glob" from="*.in" to="*.in.done"/>
</apply>
</target>

</project>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message