buildpkg

来自「开源备份软件源码 AMANDA, the Advanced Marylan」· 代码 · 共 51 行

TXT
51
字号
#!/bin/bash# Buildpkg script for producing RPM packages. Does not require root access.# This is useful for debuggingset -x# Buildbot exports some useful env variables.# Check for $AMVER.  I couldn't come up with a good way to detect it.if [ -z $AMVER ]; then    AMVER=amanda-2.6.0p1fi# Check for AMTARBALL variable.if [ -z $AMTARBALL ]; then     AMTARBALL=$AMVER.tar.gzfi# Check for AMTARBALL file, if it's not there, create it.if [ ! -f ${AMTARBALL} ]; then    mkdir ${AMVER}    cp -Rfp * ${AMVER}/    tar -cf ${AMTARBALL} -z ${AMVER}    rm -rf ${AMVER}fi# Check for the packaging dirs.if [ -z $AMPKGDIR ]; then    AMPKGDIR=${PWD}fiif [ ! -d ${AMPKGDIR} ]; then    mkdir ${AMPKGDIR}ficd ${AMPKGDIR}if [ -d rpm ]; then    rm -rf rpmfimkdir rpmmkdir rpm/SOURCESmkdir rpm/SRPMSmkdir rpm/SPECSmkdir rpm/BUILDmkdir rpm/RPMS# Make a copy of the tarball with the name that rpmbuild expectscp ${AMTARBALL} rpm/SOURCES/${AMVER}.tar.gzcp packaging/rpm/amanda.spec rpm/SPECS/amanda.spec# Rpmbuild requires absolute paths.  annoying.  If you need to change the # default value of some rpm.spec variable, just pass extra --define options.# this is useful for changing %amanda_release or %amanda_versionrpmbuild -ba --define "_topdir ${AMPKGDIR}/rpm" \             ${AMPKGDIR}/rpm/SPECS/amanda.spec 

⌨️ 快捷键说明

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