Fixed disres again
[gromacs/adressmacs.git] / NOGMX
blobb1f1b9f5c4f4480841ae98aefdd42f20a35b8347
1 # remove all environment variables set by GMXRC
3 setenv bVerb 1
4 if ( "$1" == "-quiet" ) setenv bVerb 0
6 if ($bVerb) echo "Being loud and noisy"
8 if ( $shell == "/bin/tcsh" ) then
9   if ( $?GMXBIN ) then
10     if ( -d $GMXBIN ) then
11       if ( $bVerb ) echo "uncomplete all GROMACS programs"
12       foreach f ( `\ls $GMXBIN` )
13         uncomplete $f
14       end
15     endif
16   endif
17 endif
19 if ( ($?LD_LIBRARY_PATH) && ($?GMXHOME) && (($?GMXCPU) || ($?CPU)) ) then
20   if ( (! $?GMXCPU) && ($?CPU) ) then
21     setenv GMXCPU $CPU
22   endif
23   unsetenv TEMPPATH
24   unsetenv PATHSET
25   foreach i ( `echo $LD_LIBRARY_PATH | sed "s/:/ /g"` )
26     setenv PATHSET
27     if ( ( "$i"  != "$GMXHOME/lib/$GMXCPU" ) && ( "$i/" != "$GMXHOME/lib/$GMXCPU" ) ) then
28       if ( ! $?TEMPPATH ) then
29         setenv TEMPPATH $i
30       else
31         setenv TEMPPATH "$TEMPPATH":"$i"
32       endif
33     else
34       if ( $bVerb ) echo "Removed $GMXHOME/lib/$GMXCPU from LD_LIBRARY_PATH"
35     endif
36   end
37   if ($?PATHSET) then
38     if (! $?TEMPPATH) setenv TEMPPATH
39     setenv LD_LIBRARY_PATH $TEMPPATH
40     unsetenv TEMPPATH
41     unsetenv PATHSET
42   else
43     echo "You might want to remove $GMXHOME/lib/$GMXCPU from LD_LIBRARY_PATH"
44   endif
45 endif
47 if ($?GMXCPU) then
48   if ( $bVerb ) echo "unsetenv GMXCPU ($GMXCPU)"
49   unsetenv GMXCPU
50 endif
52 if ($?GMXLIB) then
53   if ( $bVerb ) echo "unsetenv GMXLIB ($GMXLIB)"
54   unsetenv GMXLIB 
55 endif
57 if ( ($?GMXMAN) && ($?MANPATH) ) then
58   if ($MANPATH == $GMXMAN) then
59     unsetenv MANPATH
60   else
61     if ( $bVerb ) echo "You might want to remove $GMXMAN ("\$"GMXMAN) from "\$"MANPATH"
62   endif
63 endif
65 if ($?GMXMAN) then
66   if ( $bVerb ) echo "unsetenv GMXMAN ($GMXMAN)"
67   unsetenv GMXMAN
68 endif
70 if ($?GMXHOME) then
71   if ( $bVerb ) echo "unsetenv GMXHOME ($GMXHOME)"
72   unsetenv GMXHOME
73 endif
75 if ($?GMXROOT) then
76   if ( $bVerb ) echo "unsetenv GMXROOT ($GMXROOT)"
77   unsetenv GMXROOT
78 endif
80 if ( ($?GMXBIN) && ($?PATH) ) then
81   foreach i ( $path )
82     if ( ( "$i" != "$GMXBIN" ) && ( "$i/" != "$GMXBIN" ) ) then
83       if ( ! $?TEMPPATH ) then
84         setenv TEMPPATH $i
85       else
86         setenv TEMPPATH "$TEMPPATH":"$i"
87       endif
88     else
89       if ( $bVerb ) echo Removed $GMXBIN from path
90     endif
91   end
92   if (! $?TEMPPATH) setenv TEMPPATH
93   setenv PATH $TEMPPATH
94   unsetenv TEMPPATH
95 endif
97 if ($?GMXBIN) then
98   if ( $bVerb ) echo "unsetenv GMXBIN ($GMXBIN)"
99   unsetenv GMXBIN
100 endif
101 if ($?VER) then
102   if ( $bVerb ) echo "unsetenv VER ($VER)"
103   unsetenv VER
104 endif
105 if ($?GMXVER) then
106   if ( $bVerb ) echo "unsetenv GMXVER ($GMXVER)"
107   unsetenv GMXVER
108 endif
109 if ($?GMXNPRI) then
110   if ( $bVerb ) echo "unsetenv GMXNPRI ($GMXNPRI)"
111   unsetenv GMXNPRI
112 endif
113 if ($?GMXFONT) then
114   if ( $bVerb ) echo "unsetenv GMXFONT ($GMXFONT)"
115   unsetenv GMXFONT
116 endif
117 if ($?AMBBIN) then
118   if ( $bVerb ) echo "unsetenv AMBBIN ($AMBBIN)"
119   unsetenv AMBBIN
120 endif
121 if ($?IAMCOOL) then
122   if ( $bVerb ) echo "unsetenv IAMCOOL ($IAMCOOL)"
123   unsetenv IAMCOOL
124 endif
126 #last line