chiark / gitweb /
f01b03e43233779586c0d5dd92b0148ae4e64df8
[userv.git] / buildship
1 #!/bin/sh
2 # to release, check out a fresh copy and then run this
3
4 set -e
5 if test $# = 0
6 then
7         echo >&2 'usage: buildship <version>'
8         exit 1
9 fi
10 version=$1
11 targz=userv-$version.tar.gz
12 tag=`echo release-$version | sed -e 's/\./-/g'`
13
14 echo >&2 "*** Tagging (version $version, tag $tag) ..."
15 cvs tag -F -c $tag
16
17 echo >&2 '*** Generating pre-built files ...'
18 autoconf
19 autoheader
20 ./configure
21 make ship VERSION=$version
22
23 cd shipcheck
24
25 echo >&2 '*** Checking whether identical to repository version ...'
26 tar zxf $targz
27 cvs co -r $tag userv
28 cd userv-$version
29 cp -r . ../userv/.
30 cd ../userv
31 if test "x`cvs -n update`" != x
32 then
33         echo >&2 mismatch:
34         cvs -n update
35         exit 1
36 fi
37 cd ..
38 rm -rf userv
39
40 echo >&2 '*** Doing test build ...'
41 cd userv-$version
42 ./configure
43 make
44
45 cd ../..
46
47 echo >&2 "*** OK.  Distribution file is ../$targz."
48 mv -f shipcheck/$targz ..