#! /bin/sh -
#########################################################################
# This is a shell script for sending notes in old format.  It is called
# by newsoutput, but only if you use "newsouput -o".  The script is
# never called by anybody other than newsoutput.
#
# You can specify special command for transporting notes by editing
# this file.  It isn't as easy to use as the old net.how method, but
# then this whole mess is being phased out anyway.
#
# If you have any non-uucp links, you will probably want to customize
# this; see the example for "hpbogus".  The first argument is the notesfile
# name, the second is the destination system.  Stdin contains the text.
# Note that this uses `hostname` to pick up the name of this system;
# if for some reason you need to change this, just hardcode it.
#
# Original: Tw Cook <tw@hpisla>  20 January 1986
#########################################################################

if [ $# -ne 2 ]
then
	echo Usage: nfxmitsh notesfilename tosystemname
	exit 1
fi

nfname=$1
tosystem=$2
myname=`hostname`

case $tosystem in
	hpbogus)
		rsh hpbogus /bin/nfrcv $nfname $myname
		;;
	hptest*)
		echo "===>" $1 $2 "<===" >> /tmp/nftest
		cat - >> /tmp/nftest
		;;
	*)
		uux - -r -n $tosystem!nfrcv $nfname $myname
		;;
esac
