ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rutger Hofman <rut...@cs.vu.nl>
Subject Re: passing in list of files as arguements
Date Thu, 14 Aug 2003 10:30:38 GMT
I think you are there when you go back to using foreach:

<target name="build" depends="list">
     <foreach
         list="list"
         target="gpg.target"
         param="gpg.param"
         delimiter=" "/>
</target>

and your list target from below:
<target name="list">
      <fileset dir="." id="fs" includes="*.txt">
      <pathconvert pathsep=" " property="files" refid="fs"/>
</target>

and the gpg target:
Now I do not know what you really intended; should the formal
param of the invocation be inputstring="${the_value}" or should
it be the arg value="/home/user/my.txt" ?

The first:
<target name="gpg.target">
     <exec executable= .... inputstring="${the_value}">
         ...
         <arg value="${gpg.param}"/>
     </exec>

Or the second:
<target name="gpg.target">
     <exec executable= .... inputstring="${gpg.param}"/>
         ...
         <arg value="/home/user/my.txt"/>
     </exec>
</target>

Shawn wrote:
> any ideas of how I could use the following which gives me a list of 
> files in my directories to pass in values one at a time as a command 
> line arguement?
> 
> <target name="list">
>        <fileset dir="." id="fs" />
>        <pathconvert pathsep=" " property="files" refid="fs"/>
>        <echo>${files} are in this dir
>        </echo>
>    </target>
> 
> I am trying to so something like and need to opass them in one at a time 
> and not as a list.
>   <exec executable="gpg" os="RH Linux" inputstring="${the_value}">
> <arg value="--symmetric"/>
> <arg value="--passphrase-fd"/>
> <arg value="0"/>
> <arg value="/home/user/my.txt"/>
> 
>> aagh, for getting filenames in as arguements:
>>
>> found this, will try it
> 
> 




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


Mime
View raw message