#!/bin/sh
if [ "$DISPLAY" = "" ]
then
	clear
	cat $HELP/firstsearchhelp.text
	echo -n "Do you wish to connect to Firstearch now? [y/n] "
	read answer 
	case $answer in

		[Yy]|[Yy][Ee][Ss])
			/mit/library/`machtype`bin/tfirst
			;;

		*)
			;;
	esac

else

	/etc/athena/console -appdefs $APPDEFS/console.appdefs \
		-map -unmap 0 -notimestamp -nostdin -geometry 503x300 \
		-title Help -titlebar Help -label Help -noautoscroll\
		-hideproc "delete()" -hidelabel "Quit" \
		-file $HELP/firstsearchhelp.text &
	CJOB=$!
	  xterm -name telnet -T 'FirstSearch' $TFLAGS \
	  -e `athdir /mit/library`/tfirst
	kill -TERM $CJOB 

fi

exit 0
