#!/bin/sh
#	mailshar recipient...
# Mail all the shar files in the current directory line to the recipients 
# on the command line.  Note that we assume the shar that generates
# names of the form foo.shr1, foo.shr2, etc.
if [ -n "$DBGmailshar" ];then set -x;fi
c=''
o='-v'
if [ -f Cover  ];then c=Cover;fi
for r
do	echo Mail to $r ...
	n=`echo *.shr*|wc -w`
	for f in *.sh*
	do	echo Mail $f
		(echo Subject: $f of $n; echo To: $r;echo ''; cat $c $f) | smail $o $r
	done
done
