需要使用sudo类型的安装软件ant脚本 [英] Need ant script for sudo type installation of software

查看:112
本文介绍了需要使用sudo类型的安装软件ant脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要编写Ant构建脚本在linux ENV安装软件。
我已经写了像

I need to write Ant build script to install software in linux env. I have written something like

<exec dir="${dir}" executable="/bin/sh">
    <arg value="installsoftware.sh"/>
</exec>

但我得到的问题,你必须拥有管理员或根权限才能执行。我需要运行使用sudo安装,并给予密码来执行installsoftware.sh。

But the problem I get "You must have administrator or root privilege to execute". I need to run the installation with Sudo and give password to execute installsoftware.sh.

有人可以帮我写上ant脚本调用须藤类型的安装?

Can someone help me on writing ant script to invoke sudo type installations?

在此先感谢

推荐答案

如何打开表和须藤成根并运行安装为根,即。

How about turning the tables and sudo into a root and running installation as a root, i.e.

sudo ant -f /path/to/build.xml install

这篇关于需要使用sudo类型的安装软件ant脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆