#!/bin/bash # Package name convention for openvz-sources patches: # openvz-patches-$CKV_$PVR.tar.bz2 # where # 1) CKV is the kernel version (i.e. 2.6.15) # 2) PVR is the package version + revision (i.e. 2.0.1-r1) if [ -z $2 ]; then echo "Usage: mkrelease []" exit 1 fi CKV=${1} PVR=${2} [[ -n ${3} ]] && PVR=${2}-${3} P="openvz-patches-${CKV}_${PVR}.tar.bz2" tmpdir=$(mktemp -d) svn export ${PVR} ${tmpdir}/${CKV} tar cjvf ./${P} -C ${tmpdir} ${CKV} | sort rm -rf ${tmpdir} echo "Tarball is at ./${P}"