> From: Suzanne Dorman [mailto:[EMAIL PROTECTED] > > I'm converting my build from VSS to Perforce. I have already discovered > that Perforce uses the client spec to identify the local workspace (i.e. > what local directory the files will be written to). > > But now I need to know the name of that directory to proceed with my > build. > I can get the root from the client spec via the p4 client command but I > don't know how to get that information into Ant. If I use <exec> to run > the > command, the output will go to a file but then what? I'm on Windows so I > don't see how I can do a grep or sed to get the contents of the string. > > I can't be the only person having this problem with Perforce, right? Or > am > I way off base here? > > Also, I'm sorry if this has already been answered but for some odd reason, > I > can't do a search on 'p4' in this user list. It strips 'p4' off of my > search criteria. > > Thanks in advance for any help.
<exec> has an outputproperty attribute, no? If you need to do some processing on the output to get what you want, then you could use the <redirector> stuff, with filters (I just knows this exists now, I've never used it), but it may not be in a released version. An approach you can do now is <exec> to a file. Then <loadfile> it with a <filterchain>. You should be able to get what you want in a cross-platform manner, using the appropriate filters. --DD PS: Of course, another approach is to create a small task or a <script> or <scriptdef>, but using a real programming language. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]