#!	/bin/csh -f
#
# Copyright 1993, 1994, 1995 by the Regents of the University of California.
# see the file "Copyright" in the distribution for conditions of use.
#
#
#	select a news reader
#
#		1 - get news reader from the environment & display intro
#
set rdr = $NEWS_READER
#		try to keep the following under 24 lines ...
cat << EOT

This menu item allows you to specify the Usenet news reader you want to
use.  There are three news readers available on UCLink:


   tin  An easy to use, menu oriented threaded news reader.

   rn   An older non-threaded newsreader.  Should only be used by
        experienced rn users.

   trn  A threaded news reader based on rn.  Use only if you have
        previous experience with rn or trn.

We recommend tin to new users; it is the default if you do not specify
another news reader.

This account is currently set up to use the $rdr news reader.
EOT
#
#=====================================================================
#		2 - get user's choice of news reader
#
reread1:
echo ' '
echo -n "Enter your choice for your news reader ($rdr): "

set x = $<
set y = ( $x )
if( $#y == 0 ) exit
if( $#y > 1 ) set x = "ERROR"
if( $x != "tin" && $x != "trn" && $x != "rn" ) then
	echo 'You must enter tin, trn, or rn.'
	goto reread1
endif
#	user entered a valid news reader
set rdr = $x
#
#=====================================================================
#		3 - replace NEWS_READER in .login and .cshrc
#
set_env_var NEWS_READER $rdr
if( $status ) exit 1

cat << EOT

$rdr is now saved as your news reader.

EOT
