ENH: relocate WM_PROJECT_SITE default (issue #1050)

- was PREFIX/site, now PROJECT/site

  This avoids several issues when installing OpenFOAM in clusters
  without an intermediate OpenFOAM-specific installation prefix.

  The 'site' directory may have a reserved meaning in these situations
  and it is undesirable to 'leak' upwards into the parent directory to
  look for configuration files.

  Placing the default within the project directory avoids this.
  Alternative locations can be given via the WM_PROJECT_SITE variable.
This commit is contained in:
Mark Olesen
2018-11-29 18:04:44 +01:00
parent be46f96862
commit 9e094f1f07
11 changed files with 23 additions and 25 deletions

View File

@ -148,7 +148,7 @@ if [ -n "$WM_PROJECT_SITE" ]
then
siteDir=$WM_PROJECT_SITE
else
siteDir=$WM_PROJECT_INST_DIR/site
siteDir=$WM_PROJECT_DIR/site
fi
# Shared site (group) executables/libraries
@ -173,7 +173,6 @@ if [ -d "$siteDir/$WM_PROJECT_VERSION/bin" ] # Version-specific
then
_foamAddPath "$siteDir/$WM_PROJECT_VERSION/bin"
fi
unset siteDir
_foamAddPath $FOAM_USER_APPBIN:$FOAM_SITE_APPBIN:$FOAM_APPBIN
_foamAddLib $FOAM_LIBBIN/dummy # Dummy versions of external libraries last
@ -321,7 +320,7 @@ esac
# Cleanup
# ~~~~~~~
unset archDir
unset archDir siteDir
unset gcc_version gccDir
unset gmp_version gmpDir mpfr_version mpfrDir mpc_version mpcDir
unset clang_version clangDir