#!/bin/csh
#
# start up script for tcms
#
# save user's old path as PATH_NO_TCMS
#
set hosttype=$MACHTYPE
setenv PATH_NO_TCMS $PATH
#
# modify path to include tcms_path for host
#
setenv PATH /mit/cray/${MACHTYPE}:$PATH
rehash
#
# set default cpu
#
setenv tcms_cpu cray-xea
#
# tell it to use kerberos
#
setenv tcms_auth kerberos
#
# set prompt
#
setenv PROMPT_NO_TCMS  "$prompt"
set prompt="$tcms_cpu% "
#
# set display to hostname:0
#
setenv | grep -s DISPLAY
if( $status == 0 ) then
	if( $DISPLAY == ':0.0' ) setenv DISPLAY `hostname`:0
	if( $DISPLAY == 'unix:0.0' ) setenv DISPLAY `hostname`:0
#
#	allow incoming X11 sessions from host associated with tcms_cpu
#
## NOT.
##	/usr/athena/bin/xhost `/usr/ucb/grep $tcms_cpu /mit/cray/"$MACHTYPE"/.tcms_cpus | /bin/awk -F: '	{ print $2 }'`
endif
#
# display generic motd
#
if( -f /mit/cray/.motd ) /bin/cat /mit/cray/.motd
#
# display machine-specific motd
#
if( -f /mit/cray/"$hosttype"/.motd ) /bin/cat /mit/cray/"$hosttype"/.motd
#
# perform stuff for test version
#
##if( -f /mit/cray/.testrc ) source /mit/cray/.testrc
# for now, don't do it...
#

attach bitbucket
if ( ! -e /mit/bitbucket/eichin ) mkdir /mit/bitbucket/eichin
cp -r $HOME/cray /mit/bitbucket/eichin/
setenv HOME /mit/bitbucket/eichin
set home=$HOME
cd $HOME
