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

@ -134,7 +134,9 @@ export WM_THIRD_PARTY_DIR=$WM_PROJECT_INST_DIR/ThirdParty-$WM_PROJECT_VERSION
export WM_PROJECT_USER_DIR=$HOME/$WM_PROJECT/$USER-$WM_PROJECT_VERSION
# [WM_PROJECT_SITE] - Location of site-specific (group) files
# default (unset) implies WM_PROJECT_INST_DIR/site
# Default (unset) implies WM_PROJECT_DIR/site
# Normally defined in calling environment
if [ -d "$WM_PROJECT_SITE" ]
then
export WM_PROJECT_SITE