#!/bin/sh

PATH=.:$PATH

rm -f patch
OLDPATCHLEVEL=`cat PATCHLEVEL`
PATCHLEVEL=`expr $OLDPATCHLEVEL + 1`
echo Incrementing PATCHLEVEL to patch level $PATCHLEVEL
co -l PATCHLEVEL > /dev/null 2> /dev/null
echo $PATCHLEVEL > PATCHLEVEL
echo "PATCHLEVEL incremented by makepatch" | ci -u PATCHLEVEL\
	2>/dev/null
echo Adding RCS symbols to RCS logs
addrcsname PATCHLEVEL$PATCHLEVEL $* >/dev/null 2>/dev/null
echo Putting differences into the patch file
rcsdiff -c -rPATCHLEVEL$OLDPATCHLEVEL $* \
	| egrep -v '^No differences encountered$'\
	> patch;
exit 0
