ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tharp, Joshua L, SOLGV" <jlth...@att.com>
Subject RE: Design help
Date Tue, 29 Apr 2003 22:05:58 GMT
Have you considered having a "source" bat file and just include tokens
in it (i.e. @TOKEN@)? Then you run a replace or copy on the "source" bat
with a filter and those tokens will be replaced with the correct values.
Conversely, if the tokens have already been replaced, then you won't
find any @TOKEN@ strings in your bat file and nothing will happen.

Josh

-----Original Message-----
From: Eric Dunn [mailto:edunn@merc-int.com] 
Sent: Tuesday, April 29, 2003 3:03 PM
To: 'user@ant.apache.org'
Subject: Design help

Hi,
     I am trying ot figure out how to do this correctly. I want to edit
a .bat file, looking for a specific
java call and adding a command line arguement, and something its command
line specified classpath.

So I tried replaceregexp and I it works right, but if my customer runs
it twice it has no way to check if it
already made the change. 

So I installed "Antelope" with its "if\else" tasks but it seems to check
properties. I need a property that
dynamically is set by perhaps some custom task like
"FileContains(filename,searchstring" so that the if\else
task in antelope can use it an decide whether to run my replaceregexpr.

Is this the right train of thought? Should I just write some monster
custom ant task to just read the file
myself, do java conditional logic, and insert if appropriate? I am
pretty close to doing that.

Thanks,
Eric

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


Mime
View raw message