ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniels, Doug" <Doug.Dani...@gdc4s.com>
Subject RE: can i have quotes in the value?
Date Tue, 13 Apr 2004 12:34:56 GMT
You can also try using XML entity references for the quote character, for example:

<exec dir="build/${ssl.name}" executable="make">
    <env key="LD_LIBRARY_PATH" value="/usr/local/lib"/>
    <env key="LD_RUN_PATH" value=""/>
    <arg value="CC=&quot;gcc -static-libgcc&quot;"/>
</exec>

Here is a list of other useful XML character entity references:

&lt < less-than sign 
&gt > greater-than sign 
&quot " double quotation mark 
&apos ' apostrophe 
&amp & ampersand 
&#10; line feed (\n)

The newline entity reference is useful when you need to pass newlines through the inputstring
attribute of the <exec> command, so that you can enter inputs and then hit return, for
example:

      <!-- &#10; is line feed character to skip prompts -->
      <exec executable="${coeMakeInstall}" failonerror="true"
        dir="${tmpDirBase}"
        inputstring="&#10;${SegmentName_Version}.tar&#10;y&#10;y&#10;">
        <arg value="-p"/>
        <arg value="${tmpDirBase}"/>
        <arg value="${SegmentName}"/>
      </exec>


So In this example we send a line feed first, enter in the segment tar file, send another
line feed, then answer y for the first prompt then line feed, then input y for the next prompt
and line feed.

~ Doug Daniels

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


Mime
View raw message