简体   繁体   English

如果脚本位于其他目录中,则shell脚本不会由ant使用exec标签运行

[英]Shell script isn't run by ant using exec tag if script is in a different directory

Here is the portion of my ant script that doesn't work properly. 这是我的ant脚本无法正常工作的部分。

<exec executable="/bin/bash">
    <arg value="../libraries/android-mapviewballoons/android-mapviewballoons/mapimports.sh" />
    <arg value="a"/>
</exec>
<exec executable="/bin/bash">
    <arg value="mapimports.sh"/>
    <arg value="a"/>
</exec>

The first script never runs, but the second script runs fine. 第一个脚本永远不会运行,但是第二个脚本可以正常运行。 No errors are returned. 没有错误返回。 I've tried running both scripts manually and they work. 我试过手动运行两个脚本,它们都可以工作。

Does anyone know how I might debug this or make it work? 有谁知道我该如何调试或使其工作?

I got something similar running with: 我有类似的运行:

<exec executable="bash" dir="./pathToScript/" >
    <arg value="script.sh" />
    <arg value="param" />
</exec>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM