#!/bin/csh -f
# SCCSid "@(#)newuser 2.4 8/21/92 LBL"
#
# Script to get new user information.
#
set tfile=/tmp/m$$
if ( ! $?EDITOR ) then
	setenv EDITOR vi
endif
onintr quit
cat <<_EOF_

This script asks some basic user information that will be mailed
back to headquaters.  Your name and address will be added to a
database of people using RADIANCE, so that software update and workshop
information can be sent to you directly (if you desire).

Please enter your name and regular mail address (followed by ^D):
_EOF_
echo \~s New `cat src/rt/VERSION` user >$tfile
echo "Mail address:" >>$tfile
sed 's/^/	/' >>$tfile
echo -n 'Phone number: '
echo "Phone: $<" >>$tfile
echo -n 'Electronic mail address: '
echo "E-mail: $<" >>$tfile
echo -n 'Do you wish to subscribe to our mediated mailing list? '
echo "On list: $<" >>$tfile
echo -n 'Machine(s): '
echo "Machine: $<" >>$tfile
echo -n 'Operating system(s): '
echo "System: $<" >>$tfile
echo -n 'Where did you hear about Radiance? '
echo "Source: $<" >>$tfile
echo 'Application area/comments (followed by ^D):'
echo "Application:" >>$tfile
sed 's/^/	/' >>$tfile
echo "<EOT>"
echo ""
cat $tfile
echo ""
echo -n "Would you like to edit this information? "
if ( "$<" =~ [yY]* ) then
	$EDITOR $tfile
endif
echo "...sending mail to GJWard@lbl.gov"
mail GJWard@lbl.gov <$tfile
set ms=$status
rm -f $tfile
exit $ms

quit:
rm -f $tfile
exit 1
