STYLE: avoid old-style shell backticks in various places

This commit is contained in:
Mark Olesen
2017-02-20 09:30:58 +01:00
committed by mark
parent 957635200a
commit d3911dd167
19 changed files with 117 additions and 130 deletions

View File

@ -3,7 +3,7 @@
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ M anipulation |
# \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM.
@ -136,7 +136,7 @@ export WM_PROJECT_USER_DIR=$HOME/$WM_PROJECT/$USER-$WM_PROJECT_VERSION
. $WM_PROJECT_DIR/etc/config.sh/functions
# Add in preset user or site preferences:
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile prefs.sh`
_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile prefs.sh)
# Evaluate command-line parameters and record settings for later
# these can be used to set/unset values, or specify alternative pref files
@ -148,14 +148,14 @@ _foamEval $@
foamClean=$WM_PROJECT_DIR/bin/foamCleanPath
#- Clean PATH
cleaned=`$foamClean "$PATH" "$foamOldDirs"` && PATH="$cleaned"
cleaned=$($foamClean "$PATH" "$foamOldDirs") && PATH="$cleaned"
#- Clean LD_LIBRARY_PATH
cleaned=`$foamClean "$LD_LIBRARY_PATH" "$foamOldDirs"` \
cleaned=$($foamClean "$LD_LIBRARY_PATH" "$foamOldDirs") \
&& LD_LIBRARY_PATH="$cleaned"
#- Clean MANPATH
cleaned=`$foamClean "$MANPATH" "$foamOldDirs"` && MANPATH="$cleaned"
cleaned=$($foamClean "$MANPATH" "$foamOldDirs") && MANPATH="$cleaned"
export PATH LD_LIBRARY_PATH MANPATH
@ -168,35 +168,35 @@ _foamSource $WM_PROJECT_DIR/etc/config.sh/aliases
# Source user setup files for optional packages
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.sh/mpi`
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.sh/paraview`
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.sh/vtk`
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.sh/ensight`
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.sh/gperftools`
_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/mpi)
_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/paraview)
_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/vtk)
_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/ensight)
_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/gperftools)
##_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.sh/ADIOS`
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.sh/CGAL`
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.sh/scotch`
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.sh/FFTW`
##_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/ADIOS)
_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/CGAL)
_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/scotch)
_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/FFTW)
# Clean environment paths again. Only remove duplicates
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#- Clean PATH
cleaned=`$foamClean "$PATH"` && PATH="$cleaned"
cleaned=$($foamClean "$PATH") && PATH="$cleaned"
#- Clean LD_LIBRARY_PATH
cleaned=`$foamClean "$LD_LIBRARY_PATH"` && LD_LIBRARY_PATH="$cleaned"
cleaned=$($foamClean "$LD_LIBRARY_PATH") && LD_LIBRARY_PATH="$cleaned"
#- Clean MANPATH (trailing ':' to find system pages)
cleaned=`$foamClean "$MANPATH"`: && MANPATH="$cleaned"
cleaned=$($foamClean "$MANPATH") && MANPATH="${cleaned}:"
export PATH LD_LIBRARY_PATH MANPATH
#- Clean LD_PRELOAD
if [ -n "$LD_PRELOAD" ]
then
cleaned=`$foamClean "$LD_PRELOAD"` && LD_PRELOAD="$cleaned"
cleaned=$($foamClean "$LD_PRELOAD") && LD_PRELOAD="$cleaned"
export LD_PRELOAD
fi