#!/bin/sh

me=`basename $0`

case $me in
	csisub)
		command="subscribe";;
	csiunsub)
		command="unsubscribe";;
	*)
		echo "Not invoked as csisub or csiunsub." 1>&2
		exit 1
esac

if [ $# != 1 ]; then
	echo "Wrong number of arguments" 1>&2
	echo "Usage: $me <address to $command>" 1>&2
	exit 1
fi

/usr/ucb/mail -s $command majordomo@news-digests.mit.edu<<EOM
approve password $command comp-software-international $1 
EOM
