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