ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <hol...@yahoo.com>
Subject RE: Need help running Ant under cygwin on Win2k
Date Wed, 19 Jun 2002 21:48:49 GMT
--- Chris Bailey <chris@codeintensity.com> wrote:
> Putting it in the path is not really acceptable.

That's why I also suggested using <env> instead, so you could include the
dir the script lives in when you run your <exec>.

To make the whole thing platform-independent, you'd want to set up a
<path> based on where the script lives plus your PATH env var (so you'd
need to do a <property environment=.../>), then <pathconvert> that <path>
into a property, and reference that property in the 'value' for the <env>.
For example:

  <property name="filename" value="src/lib/foo.a"/>
  <property environment="env"/>
  <path id="path" path="${env.PATH}:${env.TEMP}/bin"/>
  <target name="main">
    <pathconvert pathsep="${path.separator}" refid="path"
property="path"/>
    <exec executable="sh">
      <arg line='-c "printit.pl ${filename}"'/>
      <env key="PATH" value="${path}"/>
    </exec>
  </target>

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

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


Mime
View raw message