chiark / gitweb /
Bugfix.
[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 cp userv-$version/* userv/.
29 cd userv
30 if test "x`cvs -n update`" != x
31 then
32         echo >&2 mismatch:
33         cvs -n update
34         exit 1
35 fi
36 cd ..
37 rm -rf userv
38
39 echo >&2 'Doing test build ...'
40 cd userv-$version
41 ./configure
42 make
43
44 cd ../..
45
46 echo >&2 "OK.  Distribution file is ../$targz."
47 mv -f shipcheck/$targz ..