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

📄 make-rpm

📁 用vc++编写的虚拟机仿真系统。可以模拟真实操作系统的一些功能。
💻
字号:
#!/bin/bash -x########################################################################## $Id: make-rpm,v 1.1 2001/12/08 15:59:50 bdenney Exp $########################################################################## build/redhat/make-rpm## This script creates an RPM from the bochs directory.  You must run # it as root from the top of the source directory (where the configure# scripts are).  Then just run:#    ./build/redhat/make-rpm##########################################################################CAT=catRM=rmMKDIR=mkdirGREP=grepECHO=echoRPM=rpmSED=sedTAR=tarRPMSRCPATH=/usr/src/redhatSOURCES=${RPMSRCPATH}/SOURCESSPECS=${RPMSRCPATH}/SPECSRPMS=${RPMSRCPATH}/RPMSSRPMS=${RPMSRCPATH}/SRPMSRPMSPEC="build/redhat/bochs.rpmspec.template"echo Reading version from configure.in script.VERSION='unknown'eval `${GREP} '^VERSION="' configure.in`if test $? != 0 -o "$VERSION" = unknown; then  echo Could not get version number from configure.in script.  echo Exiting.  exit 1fi# test that you are able to write in the RPM build areaif test ! -w ${SOURCES}; then  echo ${SOURCES} not writable.  Maybe you aren\'t root, or the path is wrong.  echo Exiting.  exit 1fiif test ! -w ${SPECS}; then  echo ${SPECS} not writable.  Maybe you aren\'t root, or the path is wrong.  exit 1fi# copy the spec into SPECS.  The template is in $RPMSPEC, and we use# SED to substitute in the version number.${RM} -f /usr/src/redhat/SPECS/bochs.spectest $? = 0 || exit 1${CAT} ${RPMSPEC} | ${SED} "s/@SEDVERSION@/${VERSION}/g" > ${SPECS}/bochs.spectest $? = 0 || exit 1# make a TAR.GZ of the entire source directory, exactly as it is.  The# tar is placed in $SOURCES/bochs-$VERSION.tar.gz.  Because the current# directory could be named nearly anything, I copy all the contents into# $SOURCES/bochs-$VERSION and then build a tar in $SOURCES.${RM} -rf ${SOURCES}/bochs-${VERSION}test $? = 0 || exit 1${MKDIR} ${SOURCES}/bochs-${VERSION}test $? = 0 || exit 1${TAR} cf - * .??* | (cd ${SOURCES}/bochs-${VERSION} && tar xf -)test $? = 0 || exit 1(cd ${SOURCES}; tar czf bochs-${VERSION}.tar.gz bochs-${VERSION})test $? = 0 || exit 1${RM} -rf ${SOURCES}/bochs-${VERSION}test $? = 0 || exit 1# finally, start the rpm build.${RPM} -ba ${SPECS}/bochs.spec# print final statusif test $? = 0; then  echo RPM build succeeded  exit 0else  echo RPM build failed.  exit 1fi

⌨️ 快捷键说明

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