#!/bin/csh -f

set TOP=/afs/cs/academic/class/15213-s00
set HOME=$home
set USER=$user
set SHELL=$shell

set SHEND=`basename ${SHELL}`

set path = ( ${TOP}/bin $path . )

${TOP}/bin/setup-afs

${TOP}/bin/setup

switch  ("${SHEND}")
    case sh:
	set ADDLINE='PATH=/afs/cs/academic/class/15213-s00/bin:${PATH}:.'
	set ADDFILE=.profile
	breaksw
    case ksh:
	set ADDLINE='PATH=/afs/cs/academic/class/15213-s00/bin:${PATH}:.'
	set ADDFILE=.kshrc
        breaksw	
    case bash:
	set ADDLINE='PATH=/afs/cs/academic/class/15213-s00/bin:${PATH}:.'
	set ADDFILE=.bashrc
	breaksw
    case csh:
    case tcsh:
	set ADDLINE='set path = (/afs/cs/academic/class/15213-s00/bin $path .)'
	set ADDFILE=.cshrc
	breaksw
    default:
        echo "Sorry, I don't recognize the shell you are using."
        echo "You need to make sure your search path includes the directory"
        echo '       /afs/cs/academic/class/15213-s00/bin'
	echo "If you don't know how to change your environment so that this"
        echo "is so, please ask one of the teaching staff or a consultant"
        echo "for some help."
        echo
	exit
endsw


echo
echo "To access the course software, you need to make sure the 15-213"
echo "bin directory is in your search path."
echo
echo "You appear to be using the ${SHEND} shell. You should add the"
echo "following line to the file ${ADDFILE} in your home directory:"
echo "       ${ADDLINE}"
echo
echo "If you are using either csh or tcsh for your shell, and you are"
echo "having problems, try adding the above line to your .login file instead."
  

