ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peter reilly <peter.rei...@corvil.com>
Subject Re: AW: Help!!! How to verify if archive has some content
Date Tue, 06 May 2003 17:08:23 GMT
Is true...

Cheers,
Peter
On Tuesday 06 May 2003 18:00, Jan.Materne@rzf.fin-nrw.de wrote:
> Yep, that´s the solution if you want to search for a string in a text file.
> But I think Rego wants to see whether a special file is included in an
> archive.
> 	"does archive XY.zip/tar/... contain a file xyz?"
> He wrote "I want to verify if my archive contains some content."
> The word "archive" made me thinking of that.
>
> But now he has the two solutions :-)
>
>
> Jan
>
> > -----Ursprüngliche Nachricht-----
> > Von: peter reilly [mailto:peter.reilly@corvil.com]
> > Gesendet am: Dienstag, 6. Mai 2003 19:01
> > An: Ant Users List
> > Betreff: Re: Help!!! How to verify if archive has some content
> >
> > You can use the combination of <loadfile/> and
> > <condition><contains/></condition>
> > as in:
> >   <target name="contains">
> >     <loadfile property="file.contents" srcfile="file.txt"/>
> >     <condition property="file_has_seach_string">
> >       <contains string="${file.contents}"
> > substring="${search.string}"/>
> >     </condition>
> >     <echo message="has string: ${file_has_seach_string}"/>
> >   </target>
> >
> > Peter
> >
> > On Tuesday 06 May 2003 17:39, Regis Melo wrote:
> > > Hello!
> > >
> > > 	I want to verify if my archive contains some content.
> >
> > Something like this:
> > > 	if( ! myFileContains("myToken" ) )
> > > 		buildFail();
> > >
> > >
> > > 	There is any way to do this using ANT??
> > >
> > > Thanks,
> > >
> > > Regis Melo
> >
> > ---------------------------------------------------------------------
> >
> > > 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