/[vps]/vzctl/mkrelease
Gentoo

Diff of /vzctl/mkrelease

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 462 Revision 463
1#!/bin/bash 1#!/bin/bash
2 2
3# Package name convention for vzctl patches
4# vzctl-patches-${PVR}.tar.bz2
5# where
6# PVR is the package version + revision (i.e. 2.0.1-r1)
7
3if [ -z $2 ]; then 8if [ -z $1 ]; then
4 echo "Usage: mkrelease <ver> <rev>" 9 echo "Usage: mkrelease <ver> [<rev>]"
5 exit 1 10 exit 1
6fi 11fi
7 12
8PN="vzctl"
9VER="${1}" 13PVR=${1}
10REV="${2}"
11 14
12shift 2 15[[ -n ${2} ]] && PVR=${1}-${2}
16
17P="vzctl-patches-${PVR}.tar.bz2"
13 18
14tmpdir=$(mktemp -du) 19tmpdir=$(mktemp -du)
15 20
16svn export . ${tmpdir} 21svn export . ${tmpdir}
17 22
18pushd ${tmpdir} >/dev/null 23pushd ${tmpdir} >/dev/null
19pushd patches >/dev/null 24pushd patches >/dev/null
20 25
21for dir in *; do 26for dir in *; do
22 [ "${dir}" == "${VER}-${REV}" ] && mv ${dir}/* . 27 [ "${dir}" == "${PVR}" ] && mv ${dir}/* .
23 rm -rf "${dir}" 28 rm -rf "${dir}"
24done 29done
25 30
26popd >/dev/null 31popd >/dev/null
27 32
28rm -f mkrelease 33rm -f mkrelease
29 34
30popd >/dev/null 35popd >/dev/null
31 36
32tar cjvf ./${PN}-${VER}-patches-${REV}.tar.bz2 -C ${tmpdir} . | sort 37tar cjvf ./${P} -C ${tmpdir} . | sort
33 38
34rm -rf ${tmpdir} 39rm -rf ${tmpdir}
35 40
36echo "Tarball is at ./${PN}-${VER}-patches-${REV}.tar.bz2" 41echo "Tarball is at ./${P}"

Legend:
Removed from v.462  
changed lines
  Added in v.463

  ViewVC Help
Powered by ViewVC 1.1.20