java中满足要求停止后面_java-如果specfile中不满足某些条件,如何中止...

您可以将%pre节用于此类任务.

The %pre script executes just before the package is to be installed.

It is the rare package that requires anything to be done prior to

installation; none of the 350 packages that comprise Red Hat Linux

Linux 4.0 make use of it.

一些入门指南;脚本内容(未在%pre部分中使用)来自jpackage-utils,您将在此找到一些其他好的脚本示例:

%pre

# try to find jvm from java command

# try javac first, or we might get the location of the jre instead - djw

java=`which javac 2>/dev/null || :`

# if we don't have the jdk, then maybe we have the jre - djw

if [ -z "$java" ] ; then

java=`which java 2>/dev/null || :`

fi

if [ -n "$java" ] ; then

while [ -h "$java" ] ; do

java=`readlink $java 2>/dev/null`

done

return

fi

echo "Can't find java virtual machine, aborting."

exit 1

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值