ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject AW: Help!!! How to verify if archive has some content
Date Tue, 06 May 2003 16:46:09 GMT
Just thoughts ...


<property name="mytoken" value="myToken" />

<!-- temporary directory -->
<property name="tmp.dir" value="tmp"/>
<delete dir="${tmp.dir}"/>
<mkdir dir="${tmp.dir}"/>

<!-- unzip the searches file to a temporary directory -->
<unzip src="myzip.zip" dest="${tmp.dir}">
    <patternset>
        <include name="${mytoken}"/>
    </patternset>
</unzip>

<!-- search for that file -->
<available property="isThere" file="${tmp.dir}/${mytoken}"/>

<!-- do the conditional fail -->
<fail unless="isThere"/>



Jan


> -----Urspr√ľngliche Nachricht-----
> Von: Regis Melo [mailto:regisfmelo@softsite.com.br]
> Gesendet am: Dienstag, 6. Mai 2003 18:39
> An: user@ant.apache.org
> Betreff: Help!!! How to verify if archive has some content
> 
> 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
> 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message