source: CMT/v1r25p20140131/src/cleanup.csh @ 693

Last change on this file since 693 was 664, checked in by rybkin, 10 years ago

merge -r 646:663 HEAD

  • Property svn:eol-style set to native
File size: 1.5 KB
Line 
1#-----------------------------------------------------------
2# Copyright Christian Arnault LAL-Orsay CNRS
3# arnault@lal.in2p3.fr
4# Modified by Grigory Rybkin
5# See the complete license in cmt_license.txt "http://www.cecill.info".
6#-----------------------------------------------------------
7
8unsetenv CMTBIN
9unsetenv CMTCONFIG
10
11if ( $?CMTROOT == 1 ) then
12if ( $?0 == 0 ) then
13if ( $?tcsh == 1 ) then
14  source ${CMTROOT}/src/cleanup.tcsh
15else if ( "${shell:t}" == "tcsh" ) then
16  source ${CMTROOT}/src/cleanup.tcsh
17endif
18endif
19endif
20
21unsetenv CMTROOT
22
23# Remove CMT entries, if any
24set newpath=()
25foreach p (${path:q})
26  if ( "${p}" !~ "*/CMT/*" ) then
27    if ( ${#newpath} != 0 ) then
28      set newpath=(${newpath:q} ${p:q})
29    else
30      set newpath=(${p:q})
31    endif
32  endif
33end
34
35set path=(${newpath:q})
36unset newpath
37
38unalias cmt
39
40if ( $?CLASSPATH == 1 ) then
41if ( "${CLASSPATH}" =~ "*/CMT/*" ) then
42# Remove CMT entries
43  set _p="${CLASSPATH}"
44  while ( "$_p" =~ "*:*" )
45  set _p="${_p:s/:/ /}"
46  end
47
48  set newpath=
49  foreach p (${_p})
50    if ( "${p}" !~ "*/CMT/*" ) then
51      if ( "${newpath}" != "" ) then
52        set newpath=${newpath}:${p}
53      else
54        set newpath=${p}
55      endif
56    endif
57  end
58
59  if ( "${newpath}" != "" ) then
60    setenv CLASSPATH ${newpath}
61  else
62    unsetenv CLASSPATH
63  endif
64  unset _p newpath
65endif
66endif
67
68unalias jcmt
69
70# Unset MAKEFLAGS, if looks set by CMT
71if ( $?MAKEFLAGS == 1 ) then
72if ( "$MAKEFLAGS" =~ "*QUICK=1" ) then
73  unsetenv MAKEFLAGS
74endif
75endif
Note: See TracBrowser for help on using the repository browser.