ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jhoomshar...@netscape.net
Subject Re: Using shell command in ANT script
Date Mon, 29 Nov 2010 06:22:06 GMT

Thanks to all of you for taking interest in my query.
I myself is in favor of solution which can be platform independent but was clueless on how
to achieve this in ANT, the shell command which I wanted to incorporate on my ANT script is
only a part of lengthy command in actual I wanted to write the content of a folder in a file
with “/*” suffix and “jobs/” as prefix to each entry, so say a directory contains
following folders
Abc
Def
Ghi
Jkl
Above contents in my txt file should look like this:
Jobs/Abc/*
Jobs/Def/*
Jobs/Ghi/*
Jobs/Jkl/*
And so on
So to achieve the above output I thought shell script is the best and easiest way to achieve
this and which I can make a call through my ANT script, but if I get the solution in pure
ant form then it will be great. Any thoughts?







-----Original Message-----
From: David Weintraub <qazwart@gmail.com>
To: Ant Users List <user@ant.apache.org>
Sent: Thu, Nov 25, 2010 1:46 am
Subject: Re: Using shell command in ANT script


On Wed, Nov 24, 2010 at 12:33 PM, Ludwig, Michael
Michael.Ludwig@delphi-mb.de> wrote:
 It's <fixcrlf>, not <fixcrnl>.

 And you could also use <pathconvert>:
Thanks for that tip of <pathconvert>. You can also use the
flattenmapper/> to remove directory names if you so choose:
        <fileset dir="../../../jobs" id="dir">
           <include name="*"/>
       </fileset>
       <pathconvert refid="dir"
           property="dir.prop"
           pathsep="${line.separator}">
           <flattenmapper/>
       </pathconvert>
       <echo message="${dir.prop}" file="foo"/>
That should be able to replace the <exec> task.
-- 
avid Weintraub
azwart@gmail.com
---------------------------------------------------------------------
o unsubscribe, e-mail: user-unsubscribe@ant.apache.org
or additional commands, e-mail: user-help@ant.apache.org



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