altern a écrit :
How could I set ant property the value which is the result of bash script
execution? For example, I need to have target which utilizes svn and bash
utilities in order to control build execution. Speaking more specifically,
target that I'm trying to create will be used to define, whether there are
modified files in deployed application via command:
svn stat | awk -F '' ' $1=="A" || $1 == "C" || $1=="M" || $1 == "D" || $1
== "R"
altern,
i don't really understand the command but did you try "| xargs" like this
svn stat <your_svn_project> | awk -F '' ' $1=="A" || $1 == "C" ||
$1=="M" || $1 == "D" || $1 == "R"' | xargs -t -i ant -Dsrc='{}'
the xargs command will launch your ant build file with the result of the
awk command as property for src....
i tried with this build file and it works ;-)
<project name="fooProject" default="echoproperty" basedir=".">
<description>
simple example build file launched with xargs
</description>
<!-- set global properties for this build -->
<property name="src" value=""/>
<target name="echoproperty">
<echo>the property send to the build file is: ${src}</echo>
</target>
</project>
more links on xargs:
http://sidvind.com/wiki/Xargs_by_example
http://en.wikipedia.org/wiki/Xargs
http://www.computerhope.com/unix/xargs.htm
hope this help
supareno
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
For additional commands, e-mail: user-h...@ant.apache.org