#!/bin/csh -f # # Usage: setup # setting up the account. # set DIR = /afs/nd.edu/courses/math/math211.01 touch "$DIR/.beihu_record/setup/$USER" echo " Check your home directory. If it contains math211 and/or math211hw," echo " you should rename them before running this script. " echo -n " Proceed? (y/n) " if ( $< != 'y' ) exit(-1) set math211bin = `grep "$DIR/bin" "$HOME/.cshrc"` if ( "$math211bin" != '') then echo "Check your .cshrc file. It may already be set" else echo "adding the path for the course" echo 'set path = ( $path '"$DIR"'/bin )' \ >>"$HOME/.cshrc" echo "done" endif echo "make a link the the course folder, called math211" ln -s "$DIR" "$HOME/math211" echo "done" echo "make a directory math211hw for doing homeworks" mkdir $HOME/math211hw echo "done" echo "set permissions for math211hw" fs setacl $HOME/math211hw system:anyuser none echo "done" echo "To use the new setting, LOGOUT and then re-login" sleep 2 echo "To use the new setting, LOGOUT and then re-login"