The only way I can see, is to set shell into debug mode, using set -x

<antcontrib:shellscript shell="bash" failonerror="true">
  set -x
   ls -l /tmp
</antcontrib:shellscript>

Peter
On Fri, Jan 13, 2012 at 8:16 PM, grayaii <george.g...@rsa.com> wrote:
> A lot of our build.xmls contain things like this, where “ls -l /tmp” is just
> some arbitrary command:
>
> <antcontrib:shellscript shell="bash" failonerror="true">
>                ls -l /tmp
> </antcontrib:shellscript>
>
> When you run this (with verbosity on), you get the output of ls. So far so
> good.
>
> What you *don’t* get is what command just ran.  In this case, we do not see
> “ls -l /tmp” anywhere in ant's output!
> The only thing you do see is the name of shell script that was generated
> on-the-fly :
>
> [antcontrib:shellscript] Executing 'bash' with arguments:
> [antcontrib:shellscript] '/tmp/script1463789709null'
>
> Do you know how to get ant to echo what just ran?
>
> I have a bunch of build logs (which is just the output of ant), and I can't
> tell what command caused what output.
>
>
> --
> View this message in context: 
> http://ant.1045680.n5.nabble.com/determine-what-shellscript-just-ran-tp5143649p5143649.html
> Sent from the Ant - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
> For additional commands, e-mail: user-h...@ant.apache.org
>

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

Reply via email to