ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Dunn <ed...@merc-int.com>
Subject RE: Design help
Date Tue, 29 Apr 2003 22:20:54 GMT
What is the definition of original though? Here is what you have suggested as I understand
it:

We have file A. 
We know it is orginal at this point.
We run my script in your way.
I save A to some other place, let's call it B.
So the script runs, and it modifies A to what updates I want. Great!
But I will need to check whether I have created B every time I run the script (i.e. it was
only supposed to
create the backup B ONE time)

So inherently its the same problem, I need to do a test on a situation. I basically need to
know if the
condition "alreadyMadeUntouchableOriginalCopy" is true. Am I understanding you wrong? Sorry
if I am.

Thanks,
Eric

-----Original Message-----
From: Claudio Corsi [mailto:ccorsi@progress.com]
Sent: Tuesday, April 29, 2003 3:01 PM
To: Ant Users List
Subject: Re: Design help



You can still use the replaceregexp task but instead of editing the same
.bat file. You take
the original .bat file and copy to a located overriding what is their.
Then run the replaceregexp
on the file and run that file. This will insure that the new .bat file
is not being updated twice.

Eric Dunn wrote:
> 
> 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

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

Mime
View raw message