#!/bin/csh -f
#	$Source: /afs/sipb.mit.edu/project/sipbsrc/src/RCS/dsc_notify.sh,v $
#	$Author: srz $
#	$Header: /afs/sipb.mit.edu/project/sipbsrc/src/RCS/dsc_notify.sh,v 1.3 92/07/11 18:30:19 srz Exp $
#
if ($?MEETINGS) then
	set mtgs=$MEETINGS
else
	set mtgs=~/.meetings	
endif
# The discuss Zephyr notifications are of the form
# discuss,machine:pathname,* (for public meetings)
# or
# discuss,machine:pathname,user (for private meetings)
#
# this subscribes to all the public meetings listed in $mtgs

awk -F: '{print "discuss," $4 ":" $5 ",*"}' $mtgs >/tmp/zdsc$$

# this gets all other notifications for private meetings the user
# has access to.  This may generate notices for private meetings he has
# access to but does not attend.  Oh well.

echo "discuss,*,%me%" >>/tmp/zdsc$$

# do the subscriptions.
/usr/athena/bin/zctl load /tmp/zdsc$$
rm /tmp/zdsc$$
exit 0
