ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Juergen Hermann">
Subject Re: Comparing two files
Date Fri, 02 Sep 2005 17:29:31 GMT
On Fri, 02 Sep 2005 19:03:53 +0200, Nicolas Vervelle wrote:

loadfile them into 2 properties and then use a <iseq> condition.


>there's probably a simple way to do it, but I don't know how.

>I want to compare two files (see if they have the same contents, 
>timestamp can be different) and then if they differ I want to copy an 
>other file.
>Can someone help me ?

>Thanks in advance,

>PS: If you need more infos, here's the context and what I need to do.
>I have a .pot file that is created by an external tool (xgettext), but 
>I want to replace my existing .pot file only if the difference between 
>the old and the new file is significative enough (if only comments 
>differ, I want to keep the old file)
>So, for the moment, I do the following :
>- copy the old file to tmp/old.pot with <copy>
>- remove non important things in tmp/old.pot with <replaceregexp>
>- generate the new .pot file in tmp/my.pot with xgettext
>- copy the new file to tmp/new.pot with <copy>
>- remove non important things in tmp/new.pot with <replaceregexp>
>The last part for which I am asking help: if tmp/old.pot differs from 
>tmp/new.pot then replace my.pot with tmp/my.pot

>To unsubscribe, e-mail:
>For additional commands, e-mail:

Ciao, J├╝rgen

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message