ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Youngquist" <eric.youngqu...@cisco.com>
Subject RE: How can I do this in ant?
Date Fri, 17 Aug 2001 19:48:20 GMT
I figured it out ...

  <target name="build.property">
   <exec executable="/usr/bin/basename" output="build.property">
      <arg line="src/util"/>
   </exec>
  </target>

-----Original Message-----
From: Eric Youngquist [mailto:eric.youngquist@cisco.com]
Sent: Friday, August 17, 2001 3:37 PM
To: ant-user@jakarta.apache.org
Subject: How can I do this in ant?


I would like to place the string "util" in the file build.properties.

  <target name="build.property">
   <exec executable="/usr/bin/basename">
      <arg line="src/util > build.property"/>
   </exec>
  </target>

When I run, I get the following error:

build.property:
     [exec] Current OS is SunOS
     [exec] /usr/bin/basename src/util > build.property
     [exec] Usage:  basename [ path [ suffix-pattern ] ]
     [exec] Result: 1

But when I cut and paste the command to the command line, it works.

Ultimately I would like to do the following:

  <target name="build.property">
   <exec executable="/usr/bin/basename">
      <arg line="${mysys.PWD} > build.property"/>
   </exec>
  </target>

Thanks,
Eric

----------------------------------------------------------------------
Eric Youngquist                      Email: Eric.Younggquist@cisco.com
Cisco Systems, Inc                   Voice: 919 392-6157
7025 Kit Creek Rd.                   Fax:   919 392-1669
RTP, NC  27709-4987                  URL:   http://www.cisco.com



Mime
View raw message