⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 makerpm.sh

📁 Linux下的操作oracle数据库的连接库
💻 SH
字号:
#!/bin/sh# This script cares for the rpm crap.# if [ `id -u` -ne 0 ]# then#    echo This command must be run as root.#    exit 1# fiif [ $# -ne 5 ]then    echo "Usage: $0 [path to rpm] [package] [package version] [awk] [prefix]"    echo 'Possible reason for failure: rpm not found?'    echo This script should preferentially be called from the Makefile only.    exit 1fiRPM=$1PACKAGE=$2VERSION=$3AWK=$4PREFIX=$5HOMEDIR=`/bin/pwd`# export RPM=/bin/rpm-2.5.5RPMVERSION=`${RPM} --version | ${AWK} '{ if ($3 < 3 ) print("2"); else print("3"); }'`if [ ${RPMVERSION} -eq 2 ]then  echo rpm version 2.x recognized  RPMSRCDIR=`$RPM --showrc | grep ^sourcedir | ${AWK} '{ print($3); }'`  SPECDIR=`$RPM --showrc | grep ^specdir | $AWK '{ print($3); }'`  BUILDDIR=`$RPM --showrc | grep ^builddir | $AWK '{ print($3); }'`else  echo rpm version 3.x recognized -- have to make educated guesses  RPMTOPDIR=/usr/src/packages/  RPMSRCDIR=${RPMTOPDIR}/SOURCES  SPECDIR=${RPMTOPDIR}/SPECS  BUILDDIR=${RPMTOPDIR}/BUILDfiSPECFILE=${SPECDIR}/${PACKAGE}.specif [ ! -x ${RPM} ]then    echo rpm should be in $RPM but not found    exit 1ficp ${HOMEDIR}/${PACKAGE}.spec ${SPECFILE}cp ${HOMEDIR}/${PACKAGE}-${VERSION}.tar.gz ${RPMSRCDIR}/${PACKAGE}-${VERSION}.tar.gzmkdir -p ${BUILDDIR}cd ${BUILDDIR}tar xzf ${HOMEDIR}/${PACKAGE}-${VERSION}.tar.gzecho Building RPMs${RPM} -ba ${SPECFILE}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -