Browse Source

Clarify the shell-script-running stuff a bit. (faq.{xml,html})

Add needed jars for <junitreport> to lib deps table. (install.html)
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271840 13f79535-47bb-0310-9956-ffa450edef68
master
Diane Holt 23 years ago
parent
commit
3629ace7b0
3 changed files with 21 additions and 8 deletions
  1. +8
    -4
      docs/faq.html
  2. +5
    -0
      docs/manual/install.html
  3. +8
    -4
      xdocs/faq.xml

+ 8
- 4
docs/faq.html View File

@@ -895,12 +895,16 @@ shell-prompt&gt; cat &lt; foo
</td></tr>
<tr><td>
<blockquote>
<p>Execute the command shell instead, then pass the batch file or
shell script as a single command, using the <code>/c</code> or
<p>On native Unix systems, you should be able to run shell scripts
directly. On systems running a Unix-type shell (for example, Cygwin
on Windows) execute the (command) shell instead - <code>cmd</code>
for batch files, <code>sh</code> for shell scripts - then pass the
batch file or shell script (plus any arguments to the script)
as a single command, using the <code>/c</code> or
<code>-c</code> switch, respectively. See
<a href="#shell-redirect-2">the above section</a>
for example <code>&lt;exec&gt;</code> tasks
executing <code>sh</code>. On Windows, use something like:</p>
executing <code>sh</code>. For batch files, use something like:</p>
<div align="left">
<table cellspacing="4" cellpadding="0" border="0">
<tr>
@@ -911,7 +915,7 @@ shell-prompt&gt; cat &lt; foo
<tr>
<td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#ffffff"><pre>
&lt;exec dir=&quot;.&quot; executable=&quot;cmd.exe&quot; os=&quot;Windows NT&quot;&gt;
&lt;exec dir=&quot;.&quot; executable=&quot;cmd&quot; os=&quot;Windows NT&quot;&gt;
&lt;arg line=&quot;/c test.bat&quot;/&gt;
&lt;/exec&gt;
</pre></td>


+ 5
- 0
docs/manual/install.html View File

@@ -287,6 +287,11 @@ Installing Ant / Optional Tasks</a> section above.</p>
<td>junit tasks</td>
<td><a href="http://www.junit.org/" target="_top">www.junit.org</a></td>
</tr>
<tr>
<td>xerces.jar and xalan.jar</td>
<td>junitreport task</td>
<td><a href="http://xml.apache.org/" target="_top">xml.apache.org</a></td>
</tr>
<tr>
<td>stylebook.jar</td>
<td>stylebook task</td>


+ 8
- 4
xdocs/faq.xml View File

@@ -330,14 +330,18 @@ shell-prompt> cat < foo
<question>How do I execute a batch file or shell script from Ant?</question>
<answer>

<p>Execute the command shell instead, then pass the batch file or
shell script as a single command, using the <code>/c</code> or
<p>On native Unix systems, you should be able to run shell scripts
directly. On systems running a Unix-type shell (for example, Cygwin
on Windows) execute the (command) shell instead - <code>cmd</code>
for batch files, <code>sh</code> for shell scripts - then pass the
batch file or shell script (plus any arguments to the script)
as a single command, using the <code>/c</code> or
<code>-c</code> switch, respectively. See
<a href="#shell-redirect-2">the above section</a>
for example <code>&lt;exec&gt;</code> tasks
executing <code>sh</code>. On Windows, use something like:</p>
executing <code>sh</code>. For batch files, use something like:</p>
<source><![CDATA[
<exec dir="." executable="cmd.exe" os="Windows NT">
<exec dir="." executable="cmd" os="Windows NT">
<arg line="/c test.bat"/>
</exec>
]]></source>


Loading…
Cancel
Save