#! /bin/sh
# execit.link - use after make-ing execit to link the MH versions automatically

incfile=execit.include
if [ ! -r $incfile ]
then
	echo "`basename $0`: can't read '$incfile'; quitting." 1>&2
	exit 1
fi

outdir=${HOME?}/.bin

# EACH LINE OF $incfile HAS LINK NAME AND PROGRAM, LIKE THIS:
#	"thanks", "/usr/local/mh/repl",
# USE sed TO GRAB FIRST WORD ON EACH LINE, WITHOUT THE QUOTES.
for link in `sed 's/^[^"]*"\([^"][^"]*\)".*/\1/' $incfile`
do
	rm -f $outdir/$link
	ln $outdir/execit $outdir/$link
done
exit 0
