PG=ked_notify
U=$PUBKIN/LOGS/kuser.hyo
N=$PUBKIN/MAN/news.new
A=$PUBKIN/LOGS/news.hyo
X=NO
for i in $U $N $A
do
if test ! -s $i
then
echo "($PG) <cannot find> $i"
X=YES
fi
done
for i in $N $A
do
if test ! -w $i
then
echo "($PG) <cannot write> $i"
X=YES
fi
done
if test $X = YES
then
echo -n "($PG) continue(y,n)? "
read x
case $x in
	n*)	exit 69;;
	y*)	;;
	*)	;;
esac
fi
if test -s $A
then
X=`cat $A`
C=`expr $X + 1`
else
C=1
fi
echo $C > $A
D=`date`
B="\
==========
($C) BIBLIOFILE NEWS ($D)
==========
==========
==========
==========
"
T=/usr/tmp/$PG$$
trap '/bin/rm -f $T;exit' 0 1 2 3 4 14
echo "$B" > $T
vi +1 $T
if test ! -s $T
then
exit
fi
xtabs $T
if test -s $N
then
chmod 644 $N
fi
lifo $T $N
echo -n "($0) mail this notice (y,n)? "
read x
case $x in
	y|Y) 	mail -s Bibliofile `cat $U` < $T;;
	*)		exit 0;;
esac
