summaryrefslogtreecommitdiff
blob: 7f309c295c9a0fd9dfffb7896a9ad54255432fbc (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
30
31
32
33
34
35
#!/bin/bash

if [ -z $2 ]; then
	echo "Usage: mkrelease <ver> <rev>"
	exit 1
fi

VER="${1}"
REV="${2}"

shift 2

tmpdir=$(mktemp -du)

svn export . ${tmpdir}

pushd ${tmpdir} >/dev/null
pushd patches >/dev/null

for dir in *; do
	[ "${dir}" == "${VER}-${REV}" ] && mv ${dir}/* .
	rm -rf "${dir}"
done

popd >/dev/null

rm -f mkrelease

popd >/dev/null

tar cjvf ./dietlibc-${VER}-patches-${REV}.tar.bz2 -C ${tmpdir} . | sort

rm -rf ${tmpdir}

echo "Tarball is at ./dietlibc-${VER}-patches-${REV}.tar.bz2"