#! /bin/sh
# This is a shell archive.  Remove anything before this line, then feed it
# into a shell via "sh file" or similar.  To overwrite existing files,
# type "sh file -c".
# Contents:  checkm
# Wrapped by kent@sparky on Tue Nov 23 11:57:53 1993
PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
echo If this archive is complete, you will see the following message:
echo '          "shar: End of archive."'
if test -f 'checkm' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'checkm'\"
else
  echo shar: Extracting \"'checkm'\" \(2733 characters\)
  sed "s/^X//" >'checkm' <<'END_OF_FILE'
X#!/bin/sh
X#
X# Date: Tue, 23 Nov 93 12:43:03 -0500
X# From: zorch@uunet.uu.net (Scott Hazen Mueller)
X# Message-Id: <9311231743.AA13094@ftp.UU.NET>
X# Subject: Re:  Cross-posted messages
X# 
X# > If I approve the post to all groups, I might end up posting to someone 
X# > else's moderated group (and I can't really check 5 or 10 newsgroups every 
X# > time I post a cross-posted message).
X# 
X# This is just a SMOP (Small Matter Of Programming).  Call the script as
X# 'checkm <article-file> <my-newsgroup>'.  Modify active to point to the active
X# file and myaddr to by your return email address.  Change the command
X# 'cat $HOME/.sigs/base' to 'cat $HOME/.signature' or whatever.
X# 
X# The exit status (1 or 0) reflects whether the article was forwarded (status 1)
X# or not (status 0), the latter either because the article is not cross-posted
X# to multiple moderated groups or because it was and you decided not to forward,
X# for example when you already have the other moderator's permission to post.
X# 
X#
Xtmpf=/tmp/checkm.$$
Xactive=/archive/uunet-info/active
Xmod=/tmp/check.mod.$$
Xfile=$1
Xmygroup=$2
Xmyaddr=zorch@uunet.uu.net
Xexport myaddr mygroup
X 
Xsed -n -e "/^Newsgroups: /s/^Newsgroups: //p" $1 | tr ',' '\012' | \
X  grep -v "$2" | sed -e "s/$/ /" >$tmpf
X 
Xzcat $active | fgrep -f $tmpf | grep " m$" >$mod
X 
Xif [ -s $mod ]; then
X  echo The following moderated groups were found:
X  while read group low hi flag
X    do
X    echo $group
X  done <$mod
X  read group stuff <$mod
X  addr=`echo $group | tr '.' '-'`
X  export addr group
X  echo Do you want to forward this article for approval\?
X  read ans
X  case $ans in
X    y*|Y*) echo Mailing article to $addr...;
X           ( echo Subject: Article forwarded for approval
X             echo
X             echo The appended article was received by the moderator for $mygroup.
X             echo It was cross-posted to your group $group.  The $mygroup
X             echo moderator has approved the article for posting to his/her group.
X             echo
X             echo If you do not want the article posted to your group, please
X             echo return the whole article to $myaddr with a note stating your
X             echo preference and I will post it to $mygroup only.
X             echo
X             echo Otherwise, please post the article to your group $group and
X             echo retain the cross-posting to $mygroup.
X             echo
X             echo Thank you for your assistance.
X             echo
X             cat $HOME/.sigs/base
X             echo
X             echo "Start submission".
X             cat $file
X             ) | /bin/mail $addr@uunet.uu.net;
X             rm -f $tmpf $mod; exit 1; break ;;
X    *) rm -f $tmpf $mod; exit 0; break ;;
X  esac
Xfi
X
Xrm -f $tmpf $mod
Xexit 0
X
END_OF_FILE
  if test 2733 -ne `wc -c <'checkm'`; then
    echo shar: \"'checkm'\" unpacked with wrong size!
  fi
  # end of 'checkm'
fi
echo shar: End of archive.
exit 0
