
set line=$1

if ("$line" == "") then
  echo Invalid input
  exit 1
endif

if( ! -e /afs/andrew.cmu.edu/usr/guest001/Matlab-home/$line ) then
    mkdir  /afs/andrew.cmu.edu/usr/guest001/Matlab-home/$line
    cp .cshrc /afs/andrew.cmu.edu/usr/guest001/Matlab-home/$line/
    cp startup.m /afs/andrew.cmu.edu/usr/guest001/Matlab-home/$line/
endif

setenv HOME /afs/andrew.cmu.edu/usr/guest001/Matlab-home/$line
cd $HOME

echo Starting XEMACS...
(xemacs foo.m &)
sleep 5

echo ""
echo Now type "matlab" to run matlab
