summaryrefslogtreecommitdiff
blob: 9fc765089f9201d21b049d982e73cc0b589c6341 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash

# Package name convention for vserver-sources patches:
# vserver-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 <kernelver> <ver> [<rev>]"
	exit 1
fi

CKV=${1}
PVR=${2}

[[ -n ${3} ]] && PVR=${2}-${3}

P="vserver-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}"