source: trunk/packs/dotfiles/env_setup @ 1434

Revision 1434, 1.2 KB checked in by shanzer, 36 years ago (diff)
Initial revision
Line 
1#
2#     Ademola Aderibigbe
3#     MIT Project Athena
4#     7/7/88
5#
6#      This sets up the subject window and its environment.  It is sourced
7#      by the "setup" command.  When setup is invoked with the subject number,
8#      it creates a new  window (xterm) ,changes the prompt to the subject
9#      number, sources the .attachrc file in the locker (if one exists) and
10#      modifies the path according to the type of machine being used.
11
12
13 set dir = `/bin/athena/attach -p $SUBJECT`
14 if (! $status) then
15        set prompt = "$SUBJECT% "
16        if ( -r $dir/.attachrc) then
17              source $dir/.attachrc
18        else
19
20#          Do this only if no .attachrc (This should encourage instructors
21#          to keep two sets of binaries in the appropriate directories
22#          even if they are not using .attachrc/.detachrc files).
23
24               set path = ($path $dir/${hosttype}bin)
25        endif 
26  else
27        echo " "
28        echo "There is a problem--the locker may have already been attached,"
29        echo "the server on which the locker resides may be inaccessible"
30        echo "at this time or the locker may not exist (wrong name?). "
31        echo "     If you want to kill this window type exit"   
32  endif
33  unset dir
34  unsetenv SUBJECT
35
36
Note: See TracBrowser for help on using the repository browser.