ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vihan Pandey" <vihanpan...@gmail.com>
Subject Re: for task with inline exec?
Date Mon, 20 Aug 2007 13:07:17 GMT
> Have you tried execs outputproperty or redirectors?

I'm having some trouble getting the pipes within the arg line :

i.e
---8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<----
<exec executable="cat">
    <arg value="${deployroot}/deploy.properties" />
    <redirector outputproperty="redirector.out">
        <outputmapper type="merge" to="redirector.out"/>
    </redirector>
</exec>

<echo message="this is ${redirector.out}" />
---8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<----

will show me all of the contents of my deploy.properties

But something like this :

---8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<----
<exec executable="cat">
    <arg value="${deployroot}/deploy.properties" />
    <arg value="|" />
    <arg value="/bin/gerp .js" />
    <redirector outputproperty="redirector.out">
        <outputmapper type="merge" to="redirector.out"/>
    </redirector>
</exec>

<echo message="this is ${redirector.out}" />
---8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<----

fails.

I tried arg line via bash :

---8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<----
<exec executable="/bin/bash">
  <arg line='-f "cat ${deployroot}/deploy.properties | grep .js | sed
s/.js-version=v.[0-9]*/,/g | tr -d \n"' />
    <redirector outputproperty="redirector.out">
        <outputmapper type="merge" to="redirector.out"/>
    </redirector>
</exec>

<echo message="this is ${redirector.out}" />
---8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<----

that gives a no "No such file or directory"

If i try :

---8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<----
<exec executable="/bin/cat">
  <arg line="${deployroot}/deploy.properties | /bin/grep .js |
/bin/sed s/.js-version=v.[0-9]*/,/g | tr -d '\n' " />
    <redirector outputproperty="redirector.out">
        <outputmapper type="merge" to="redirector.out"/>
    </redirector>
</exec>
---8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<----

This fails as well.

Any suggestions?

Regards,

- vihan

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


Mime
View raw message