#! /bin/sh
# modroute group - compute route to moderator of group
# =()<. ${NEWSCONFIG-@<NEWSCONFIG>@}>()=
. ${NEWSCONFIG-/usr/local/lib/news/bin/config}
export NEWSCTL NEWSBIN NEWSARTS NEWSPATH NEWSUMASK NEWSMASTER NEWSCONFIG
PATH=$NEWSCTL/bin:$NEWSBIN:$NEWSPATH; export PATH

ng="$1"
# a dreadful B 2.11 hack: backbone == all
(sed 's/^backbone[	 ]/all /' $NEWSCTL/mailpaths | gngp -a -r "$ng";
 echo 'default	%s') |
	sed -n "
	1{
		s/^[^	 ]*[	 ][	 ]*//
		s/%s/` echo $ng | tr . - `/
		p
		q
	}"
