+# to release, check out a fresh copy and then run this
+
+set -e
+version=`sed -n 's/^#define VERSION \".*\" *$/\1/'
+targz=userv-$version.tar.gz
+tag=`echo release-$version | sed -e 's/\./-/g'`
+
+echo >&2 "*** Tagging (version $version, tag $tag) ..."
+cvs tag -F -c $tag
+
+echo >&2 '*** Generating pre-built files ...'
+autoconf
+autoheader
+./configure
+make ship VERSION=$version
+
+cd shipcheck
+
+echo >&2 '*** Checking whether identical to repository version ...'
+tar zxf $targz
+cvs co -r $tag userv
+cd userv-$version
+cp -r . ../userv/.
+cd ../userv
+if test "x`cvs -n update`" != x