--- /dev/null
+#!/bin/bash
+
+if [ ! "$1" ]
+then
+ echo -n "minor version: "
+ read minor
+else
+ minor=$1
+fi
+
+topdir=$(pwd)
+
+lastminor=$(($minor-1))
+
+tag=r0_7_$minor
+version=0.7.$minor
+lasttag=r0_7_$lastminor
+
+export CVSROOT=oss.lineo.com:/var/cvs
+
+echo 'removing export_tmp'
+rm -rf export_tmp
+
+mkdir export_tmp
+exportdir=${topdir}/export_tmp
+
+cd export_tmp
+
+echo "deleting tag $tag"
+cvs rtag -d $tag comedilib
+
+echo "tagging $tag"
+cvs rtag $tag comedilib
+
+echo "exporting"
+cvs export -r $tag comedilib
+
+echo "diffing"
+cvs rdiff -u -r $lasttag -r $tag comedilib >../patch-comedilib-$version
+
+mv comedilib comedilib-$version
+
+cd comedilib-$version
+
+echo version=${version} >version
+rm etc/rel_comedilib
+rm todo
+make -C doc
+
+cd ${exportdir}
+
+echo "version=$version" >comedilib-$version/version
+
+tar -czvf ../comedilib-$version.tgz comedilib-$version
+
+exit
+
+cd comedi-$version
+
+yes "" | make
+make
+make
+
+