ENH: treeDataCell: increase duplicity
[OpenFOAM-2.0.x.git] / etc / config / unset.sh
blob3996a6df921e4e836284584e8cb396fddb33379c
1 #----------------------------------*-sh-*--------------------------------------
2 # ========= |
3 # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 # \\ / O peration |
5 # \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
6 # \\/ M anipulation |
7 #------------------------------------------------------------------------------
8 # License
9 # This file is part of OpenFOAM.
11 # OpenFOAM is free software: you can redistribute it and/or modify it
12 # under the terms of the GNU General Public License as published by
13 # the Free Software Foundation, either version 3 of the License, or
14 # (at your option) any later version.
16 # OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19 # for more details.
21 # You should have received a copy of the GNU General Public License
22 # along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
24 # File
25 # etc/config/unset.sh
27 # Description
28 # Clear as many OpenFOAM environment settings as possible
30 #------------------------------------------------------------------------------
32 # Clean standard environment variables (PATH, LD_LIBRARY_PATH, MANPATH)
33 foamClean=$WM_PROJECT_DIR/bin/foamCleanPath
34 [ -f "$foamClean" -a -x "$foamClean" ] || unset foamClean
36 # The old dirs to be cleaned from the various environment variables
37 # - remove anything under top-level directory.
38 # NB: the WM_PROJECT_INST_DIR might not be identical between versions
40 foamOldDirs="$WM_PROJECT_INST_DIR $WM_PROJECT_SITE"
41 if [ -n "$WM_PROJECT" ]
42 then
43 foamOldDirs="$foamOldDirs $HOME/$WM_PROJECT/$USER_SITE"
46 #------------------------------------------------------------------------------
47 # unset WM_* environment variables
49 unset WM_ARCH
50 unset WM_ARCH_OPTION
51 unset WM_CC
52 unset WM_CFLAGS
53 unset WM_COMPILER
54 unset WM_COMPILER_LIB_ARCH
55 unset WM_COMPILE_OPTION
56 unset WM_CXX
57 unset WM_CXXFLAGS
58 unset WM_DIR
59 unset WM_HOSTS
60 unset WM_LDFLAGS
61 unset WM_LINK_LANGUAGE
62 unset WM_MPLIB
63 unset WM_NCOMPPROCS
64 unset WM_OPTIONS
65 unset WM_OSTYPE
66 unset WM_PRECISION_OPTION
67 unset WM_PROJECT
68 unset WM_PROJECT_DIR
69 unset WM_PROJECT_INST_DIR
70 unset WM_PROJECT_SITE
71 unset WM_PROJECT_USER_DIR
72 unset WM_PROJECT_VERSION
73 unset WM_SCHEDULER
74 unset WM_THIRD_PARTY_DIR
77 #------------------------------------------------------------------------------
78 # unset FOAM_* environment variables
80 unset FOAM_APPBIN
81 unset FOAM_APP
82 unset FOAM_EXT_LIBBIN
83 unset FOAM_CODE_TEMPLATES
84 unset FOAM_INST_DIR
85 unset FOAM_JOB_DIR
86 unset FOAM_LIBBIN
87 unset FOAM_MPI
88 unset FOAM_RUN
89 unset FOAM_SETTINGS
90 unset FOAM_SIGFPE
91 unset FOAM_SIGNAN
92 unset FOAM_SITE_APPBIN
93 unset FOAM_SITE_LIBBIN
94 unset FOAM_SOLVERS
95 unset FOAM_SRC
96 unset FOAM_TUTORIALS
97 unset FOAM_USER_APPBIN
98 unset FOAM_USER_LIBBIN
99 unset FOAM_UTILITIES
102 #------------------------------------------------------------------------------
103 # unset MPI-related environment variables
105 unset MPI_ARCH_PATH
106 unset MPI_BUFFER_SIZE
107 unset OPAL_PREFIX
109 #------------------------------------------------------------------------------
110 # unset Ensight/ParaView-related environment variables
112 unset ENSIGHT9_READER
113 unset CMAKE_HOME
114 unset ParaView_DIR
115 unset PV_PLUGIN_PATH
118 #------------------------------------------------------------------------------
119 # cleanup environment
120 # PATH, LD_LIBRARY_PATH, MANPATH
122 if [ -n "$foamClean" ]
123 then
124 cleaned=`$foamClean "$PATH" "$foamOldDirs"` && PATH="$cleaned"
125 cleaned=`$foamClean "$LD_LIBRARY_PATH" "$foamOldDirs"` && LD_LIBRARY_PATH="$cleaned"
126 cleaned=`$foamClean "$MANPATH" "$foamOldDirs"` && MANPATH="$cleaned"
130 [ -n "$LD_LIBRARY_PATH" ] || unset LD_LIBRARY_PATH
131 [ -n "$MANPATH" ] || unset MANPATH
132 [ -n "$LD_PRELOAD" ] || unset LD_PRELOAD
135 unset cleaned foamClean foamOldDirs
138 #------------------------------------------------------------------------------
139 # cleanup aliases
141 unalias wmSET
142 unalias wm64
143 unalias wm32
144 unalias wmSP
145 unalias wmDP
147 unalias wmUNSET
149 unalias wmSchedON
150 unalias wmSchedOFF
151 unset foamPV
153 unalias src
154 unalias lib
155 unalias run
156 unalias foam
157 unalias foamsrc
158 unalias foamfv
159 unalias app
160 unalias util
161 unalias sol
162 unalias tut
164 unalias foamApps
165 unalias foamSol
166 unalias foamTuts
167 unalias foamUtils
168 unalias foam3rdParty
169 unalias foamSite
172 # ----------------------------------------------------------------- end-of-file