【发布时间】:2015-06-03 02:59:56
【问题描述】:
这是我想要将脚本从 zip 转换为可执行文件的 ant 脚本。这是我的工作:
- 解压 .zip 文件,
- 存储到临时目录
- 使用参数 validate 运行脚本“pkg”
<chmod dir="tmp/temp/test/bin" perm="ugo+rx" includes="**/*" />
<echo message="Making scripts exec: tmp/temp/test/bin" />
<exec executable="/bin/bash">
<arg value="tmp/temp/test/bin/pkg"/>
<arg value="validate"/>
</exec>
这不会使脚本可执行,而是会出现此错误:
Execute failed: java.io.IOException: Cannot run program "D:\tmp\temp\test\bin": CreateProcess error=5, Access is denied.
【问题讨论】:
-
你运行的是哪个操作系统?
-
windows 但此脚本将在所有操作系统上运行