ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Vogel <pvo...@arsin.com>
Subject property value from the result of executing a process?
Date Sun, 10 Jun 2001 05:26:47 GMT
> Before I go and do this, I'm wondering if I'm just missing something.
> 
> What I'm looking for is the ability to execute a process and store its
> output
> in a property, for example:
> 
> <property name="build" exec="cleartool describe -attr buildnum
> ${ant.file}"/>
> 
> Or, if you prefer:
> 
> <property name="build">
>     <exec executable="cleartool"> 
>         <arg line="describe -attr buildnum ${ant.file}"/>
>    </exec>
> </property>
> 
> Or perhaps?
> 
> <target name="init">
>     <exec executable="cleartool" property="build"> 
>         <arg line="describe -attr buildnum ${ant.file}"/>
>    </exec>
> </property>
>     
> 
> This seems like a pretty obvious bit of functionality to have, so I'm
> surprised I
> didn't see it already.  I'll implement if someone suggests the preferred
> syntax 
> for this.
> 
> -Peter
> 

Mime
View raw message