ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Allan <>
Subject Trying to delete files not under source control
Date Fri, 26 Apr 2002 19:02:50 GMT

I'm trying to write an Ant target that will delete all files under a given
directory that are not under Perforce version control.  My plan was to use
'p4 have' to create an exclude list which I could then pass to the <delete>

On my win2k box, 'p4 have' will return output that looks like

  //project/version/ - d:\project\build\

which I can pipe through sed to get just


So I tried this in my ant task:

 <exec executable = "p4" outputproperty = "shipFilesPerfoce">
    <arg line = "have ship\... | sed -e 's/.*\#.*- //' "/>

but exec is stripping the quotes from my sed command, at least that's how it
looks with ant -v, and I'm getting back the output of p4 have unfiltered.
And since <delete> doesn't support a <mapper> (I wonder why that is?), I
can't figure out how to filter the output from inside Ant.

Even if I could get the above to work, I'm not sure how I'd get the contents
of 'shipFilesPerforce' into a form that excludes will take.

As you can see, I'm quite lost. Can anyone suggest a sane way to approach
this problem?


-- Steve __

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message