#!/bin/csh -f

#	/usr/athena/help
#
#	This script attaches the filesystem containing the On-Line Help
#	program, then executes it.  If the program cannot be found, or
#	if it exits with status -1, an appropriate message is displayed.
#
#	$Source: /paris/source/4.3/usr.athena/RCS/help.sh,v $
#	$Author: epeisach $
#	$Header: /paris/source/4.3/usr.athena/RCS/help.sh,v 1.8 89/08/05 21:02:05 epeisach Exp $
#

set olh_script=/mit/logos/scriptbin/olh
set olh_locker=logos
set olh_backup_locker=logos_backup

onintr cleanup				#  Handle interrupts sensibly

echo "Help is on the way..."

if (! -e $olh_script) /bin/athena/attach -n $olh_locker > /dev/null
if (! -e $olh_script) /bin/athena/attach -n $olh_backup_locker > /dev/null

if (-e $olh_script) then
	$olh_script $*
	if ($status == -1) set unavailable
else
	set unavailable
endif

if ($?unavailable) then
	/usr/ucb/more -d << EOF
Sorry, the On-Line Help service is currently unavailable.

To get information about a specific command, use the _m_a_n ("manual") command:

	_m_a_n command

If you don't know the name of a command, you can look for commands that
pertain to a particular word by using the _a_p_r_o_p_o_s command:

	_a_p_r_o_p_o_s word

Some common commands are:

	_m_o_r_e	Displays a file on the screen
	_l_s	Lists the names of files in a directory
	_l_p_r	Sends a file to a printer
	_e_m_a_c_s	Edits text files
	_i_n_c	Gets your mail messages
	_s_h_o_w	Displays a mail message
	_n_e_x_t	Displays the next mail message
	_c_o_m_p	Sends a mail message
	_l_o_g_o_u_t	Ends your workstation session

To ask a Consultant for help, type _o_l_c and follow the instructions,
or call x3-4435.

The MIT Graphic Arts Copy Centers stock a variety of printed documents
describing the Project Athena system.  The Copy Centers are located in
rooms 11-004 and W20-028.

EOF
endif

cleanup:
onintr					#  Now, ignore interrupts
echo ""
exit 0
