mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: drop _foamSource definition (unneeded).
This commit is contained in:
36
etc/bashrc
36
etc/bashrc
@ -132,12 +132,12 @@ fi
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~
|
||||
export WM_PROJECT_USER_DIR=$HOME/$WM_PROJECT/$USER-$WM_PROJECT_VERSION
|
||||
|
||||
# Source initialization functions
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
# Load helper functions
|
||||
# ~~~~~~~~~~~~~~~~~~~~~
|
||||
. $WM_PROJECT_DIR/etc/config.sh/functions
|
||||
|
||||
# Add in preset user or site preferences:
|
||||
_foamSourceEtc prefs.sh
|
||||
_foamEtc prefs.sh
|
||||
|
||||
# Evaluate command-line parameters and record settings for later.
|
||||
# These can be used to set/unset values, or specify alternative pref files.
|
||||
@ -163,22 +163,22 @@ export PATH LD_LIBRARY_PATH MANPATH
|
||||
|
||||
# Source project setup files
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
_foamSourceEtc config.sh/settings
|
||||
_foamSourceEtc config.sh/aliases
|
||||
_foamEtc config.sh/settings
|
||||
_foamEtc config.sh/aliases
|
||||
|
||||
|
||||
# Source user setup files for optional packages
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
_foamSourceEtc config.sh/mpi
|
||||
_foamSourceEtc config.sh/paraview
|
||||
_foamSourceEtc config.sh/vtk
|
||||
_foamSourceEtc config.sh/ensight
|
||||
_foamSourceEtc config.sh/gperftools
|
||||
_foamEtc config.sh/mpi
|
||||
_foamEtc config.sh/paraview
|
||||
_foamEtc config.sh/vtk
|
||||
_foamEtc config.sh/ensight
|
||||
_foamEtc config.sh/gperftools
|
||||
|
||||
#_foamSourceEtc config.sh/ADIOS
|
||||
_foamSourceEtc config.sh/CGAL
|
||||
_foamSourceEtc config.sh/scotch
|
||||
_foamSourceEtc config.sh/FFTW
|
||||
#_foamEtc config.sh/ADIOS
|
||||
_foamEtc config.sh/CGAL
|
||||
_foamEtc config.sh/scotch
|
||||
_foamEtc config.sh/FFTW
|
||||
|
||||
|
||||
# Clean environment paths again. Only remove duplicates
|
||||
@ -202,13 +202,13 @@ then
|
||||
fi
|
||||
|
||||
|
||||
# Cleanup environment:
|
||||
# ~~~~~~~~~~~~~~~~~~~~
|
||||
# Cleanup environment
|
||||
# ~~~~~~~~~~~~~~~~~~~
|
||||
unset cleaned foamClean foamOldDirs
|
||||
|
||||
|
||||
# Unload initialization functions:
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
# Unload helper functions
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~
|
||||
. $WM_PROJECT_DIR/etc/config.sh/functions
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -49,7 +49,7 @@ case SYSTEMOPENMPI:
|
||||
case OPENMPI:
|
||||
setenv FOAM_MPI openmpi-2.0.2
|
||||
# Optional configuration tweaks:
|
||||
_foamSourceEtc config.csh/openmpi
|
||||
_foamEtc config.csh/openmpi
|
||||
|
||||
setenv MPI_ARCH_PATH $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$FOAM_MPI
|
||||
|
||||
|
||||
@ -213,7 +213,7 @@ if ( ! $?WM_COMPILER_TYPE ) setenv WM_COMPILER_TYPE system
|
||||
|
||||
# Load configured compiler versions, regardless of the compiler type
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
_foamSourceEtc config.csh/compiler
|
||||
_foamEtc config.csh/compiler
|
||||
|
||||
switch ("$WM_COMPILER_TYPE")
|
||||
case system:
|
||||
|
||||
@ -32,22 +32,31 @@
|
||||
|
||||
if [ -z "$WM_BASH_FUNCTIONS" ]
|
||||
then
|
||||
# Not previously loaded/defined - define now
|
||||
|
||||
# Temporary environment variable for automatically (un)loading functions
|
||||
# Temporary environment variable to track loading/unloading of functions
|
||||
WM_BASH_FUNCTIONS=loaded
|
||||
|
||||
# Source a file, possibly with some verbosity
|
||||
_foamSource()
|
||||
# Prefix to PATH
|
||||
_foamAddPath()
|
||||
{
|
||||
if [ $# -gt 0 -a -f "$1" ]
|
||||
then
|
||||
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo "Using: $1" 1>&2
|
||||
. $1
|
||||
fi
|
||||
[ $# -gt 0 ] && export PATH=$1:$PATH
|
||||
}
|
||||
|
||||
# Prefix to LD_LIBRARY_PATH
|
||||
_foamAddLib()
|
||||
{
|
||||
[ $# -gt 0 ] && export LD_LIBRARY_PATH=$1:$LD_LIBRARY_PATH
|
||||
}
|
||||
|
||||
# Prefix to MANPATH
|
||||
_foamAddMan()
|
||||
{
|
||||
[ $# -gt 0 ] && export MANPATH=$1:$MANPATH
|
||||
}
|
||||
|
||||
# Source an etc file, possibly with some verbosity
|
||||
_foamSourceEtc()
|
||||
_foamEtc()
|
||||
{
|
||||
local file
|
||||
if [ $# -gt 0 ] && file=$($WM_PROJECT_DIR/bin/foamEtcFile "$@")
|
||||
@ -85,7 +94,7 @@ then
|
||||
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo "Using: $1" 1>&2
|
||||
. "$1"
|
||||
else
|
||||
_foamSourceEtc -silent "$1"
|
||||
_foamEtc -silent "$1"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
@ -93,32 +102,12 @@ then
|
||||
done
|
||||
}
|
||||
|
||||
# Prefix to PATH
|
||||
_foamAddPath()
|
||||
{
|
||||
[ $# -gt 0 ] && export PATH=$1:$PATH;
|
||||
}
|
||||
|
||||
# Prefix to LD_LIBRARY_PATH
|
||||
_foamAddLib()
|
||||
{
|
||||
[ $# -gt 0 ] && export LD_LIBRARY_PATH=$1:$LD_LIBRARY_PATH
|
||||
}
|
||||
|
||||
# Prefix to MANPATH
|
||||
_foamAddMan()
|
||||
{
|
||||
[ $# -gt 0 ] && export MANPATH=$1:$MANPATH
|
||||
}
|
||||
|
||||
else
|
||||
# Was previously loaded/defined - now unset
|
||||
|
||||
# Cleanup environment:
|
||||
# ~~~~~~~~~~~~~~~~~~~~
|
||||
unset WM_BASH_FUNCTIONS
|
||||
unset -f _foamAddPath _foamAddLib _foamAddMan
|
||||
unset -f _foamSourceEtc _foamEval
|
||||
unset -f _foamSource
|
||||
unset -f _foamEtc _foamEval
|
||||
|
||||
fi
|
||||
|
||||
|
||||
@ -55,7 +55,7 @@ SYSTEMOPENMPI)
|
||||
OPENMPI)
|
||||
export FOAM_MPI=openmpi-2.0.2
|
||||
# Optional configuration tweaks:
|
||||
_foamSourceEtc config.sh/openmpi
|
||||
_foamEtc config.sh/openmpi
|
||||
|
||||
export MPI_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$FOAM_MPI
|
||||
|
||||
|
||||
@ -212,7 +212,7 @@ unset GMP_ARCH_PATH MPFR_ARCH_PATH
|
||||
|
||||
# Load configured compiler versions, regardless of the compiler type
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
_foamSourceEtc config.sh/compiler
|
||||
_foamEtc config.sh/compiler
|
||||
|
||||
case "$WM_COMPILER_TYPE" in
|
||||
system)
|
||||
|
||||
28
etc/cshrc
28
etc/cshrc
@ -147,13 +147,13 @@ setenv WM_PROJECT_USER_DIR $HOME/$WM_PROJECT/$LOGNAME-$WM_PROJECT_VERSION
|
||||
|
||||
# Source etc files, possibly with some verbosity
|
||||
if ($?FOAM_VERBOSE && $?prompt) then
|
||||
alias _foamSourceEtc 'eval `$WM_PROJECT_DIR/bin/foamEtcFile -csh-verbose \!*`'
|
||||
alias _foamEtc 'eval `$WM_PROJECT_DIR/bin/foamEtcFile -csh-verbose \!*`'
|
||||
else
|
||||
alias _foamSourceEtc 'eval `$WM_PROJECT_DIR/bin/foamEtcFile -csh \!*`'
|
||||
alias _foamEtc 'eval `$WM_PROJECT_DIR/bin/foamEtcFile -csh \!*`'
|
||||
endif
|
||||
|
||||
# Add in preset user or site preferences:
|
||||
_foamSourceEtc prefs.csh
|
||||
_foamEtc prefs.csh
|
||||
|
||||
# Evaluate command-line parameters and record settings for later.
|
||||
# These can be used to set/unset values, or specify alternative pref files.
|
||||
@ -180,7 +180,7 @@ while ( $#argv > 0 )
|
||||
if ($?FOAM_VERBOSE && $?prompt) echo "Using: $1"
|
||||
source "$1"
|
||||
else
|
||||
_foamSourceEtc -silent "$1"
|
||||
_foamEtc -silent "$1"
|
||||
endif
|
||||
breaksw
|
||||
endsw
|
||||
@ -213,19 +213,19 @@ if ( $status == 0 ) setenv MANPATH $cleaned
|
||||
|
||||
# Source project setup files
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
_foamSourceEtc config.csh/settings
|
||||
_foamSourceEtc config.csh/aliases
|
||||
_foamEtc config.csh/settings
|
||||
_foamEtc config.csh/aliases
|
||||
|
||||
# Source user setup files for optional packages
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
_foamSourceEtc config.csh/mpi
|
||||
_foamSourceEtc config.csh/paraview
|
||||
_foamSourceEtc config.csh/vtk
|
||||
_foamSourceEtc config.csh/ensight
|
||||
_foamEtc config.csh/mpi
|
||||
_foamEtc config.csh/paraview
|
||||
_foamEtc config.csh/vtk
|
||||
_foamEtc config.csh/ensight
|
||||
|
||||
#_foamSourceEtc config.csh/ADIOS
|
||||
_foamSourceEtc config.csh/CGAL
|
||||
_foamSourceEtc config.csh/FFTW
|
||||
#_foamEtc config.csh/ADIOS
|
||||
_foamEtc config.csh/CGAL
|
||||
_foamEtc config.csh/FFTW
|
||||
|
||||
|
||||
# Clean environment paths again. Only remove duplicates
|
||||
@ -252,6 +252,6 @@ endif
|
||||
# Cleanup environment:
|
||||
# ~~~~~~~~~~~~~~~~~~~~
|
||||
unset cleaned foamClean foamOldDirs
|
||||
unalias _foamSourceEtc
|
||||
unalias _foamEtc
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user