]> git.ipfire.org Git - thirdparty/squid.git/blame - mkrelease.sh
Bugzilla #271: diskd and comm_quick_poll_requrired
[thirdparty/squid.git] / mkrelease.sh
CommitLineData
95468954 1#!/bin/sh -e
a4572994 2if [ $# -ne 1 -a $# -ne 2 ]; then
3 echo "Usage: $0 revision [destination]"
95468954 4 exit 1
5fi
6package=squid
7rev=`echo $1 | sed -e "s/^${package}-//"`
8name=${package}-${rev}
9tag=`echo ${name} | tr a-z.- A-Z__`
a4572994 10startdir=$PWD/
11dst=${2:-$PWD}/
95468954 12
13tmpdir=$PWD/${name}-mkrelease
14
15CVSROOT=${CVSROOT:-/server/cvs-server/squid}
16export CVSROOT
17
18rm -rf $name.tar.gz $tmpdir
19trap "rm -rf $tmpdir" 0
20
21cvs -Q export -d $tmpdir -r $tag $package
22if [ ! -f $tmpdir/configure ]; then
23 echo "ERROR! Tag $tag not found in $package"
24fi
25
26cd $tmpdir
27eval `grep ^VERSION= configure | sed -e 's/-CVS$//'`
28eval `grep ^PACKAGE= configure`
29if [ ${name} != ${PACKAGE}-${VERSION} ]; then
30 echo "ERROR! The version numbers does not match!"
31 echo "${name} != ${PACKAGE}-${VERSION}"
32 exit 1
33fi
34ed -s configure.in <<EOS
35g/${VERSION}-CVS/ s//${VERSION}/
36w
37EOS
38ed -s configure <<EOS
39g/${VERSION}-CVS/ s//${VERSION}/
40w
41EOS
42
43./configure --silent
58b4f0d6 44make dist-all
95468954 45
46cd $startdir
a4572994 47cp -p $tmpdir/${name}.tar.gz $dst
48cp -p $tmpdir/${name}.tar.bz2 $dst
49cp -p $tmpdir/CONTRIBUTORS $dst/CONTRIBUTORS.txt
50cp -p $tmpdir/COPYING $dst/COPYING.txt
51cp -p $tmpdir/COPYRIGHT $dst/COPYRIGHT.txt
52cp -p $tmpdir/CREDITS $dst/CREDITS.txt
2716347a 53cp -p $tmpdir/ChangeLog $dst/ChangeLog.txt