Java Mailing List Archive

http://www.ant-tasks.com/

Home » Ant Users List »

Conditional help

DanVegas

2010-02-06


Author LoginPost Reply

Hi all,

I'm new to using Ant and need a little help with an Task I am working on?

In one part of it I need to check if a string does notexist in a certain
file and if it doesn't then I want to add it.
I looked through the manual/web and couldn't find any way of doing it.

Pseudo code:
...
<if>
 <isfalse>
   <contained in file file="${somefile}" value="${somestring}" />
      <then>
        <replace file="${src}/index.html">
          <replacefilter token="@(protected)@"
value="@mytoken@(protected)}"/>
        </replace>
     </then>
 </isfalse>
</if>
...

Any help greatly appreciated
--
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.