mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: use hard-coded user resource directory name for foamEtcFile
- previously used the value of $WM_PROJECT, but this is potentially inconsistent with what Foam::etcFiles uses.
This commit is contained in:
@ -120,9 +120,8 @@ then
|
|||||||
fi
|
fi
|
||||||
projectDirName="${projectDir##*/}" # The project directory name
|
projectDirName="${projectDir##*/}" # The project directory name
|
||||||
|
|
||||||
projectName="${WM_PROJECT:-OpenFOAM}" # The project name
|
|
||||||
projectVersion="$WM_PROJECT_VERSION" # Empty? - will be treated later
|
projectVersion="$WM_PROJECT_VERSION" # Empty? - will be treated later
|
||||||
|
userDir="$HOME/.OpenFOAM" # Hard-coded as per foamVersion.H
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -290,9 +289,9 @@ fi
|
|||||||
|
|
||||||
# Updates:
|
# Updates:
|
||||||
# - projectDir for changes via -prefix or -version
|
# - projectDir for changes via -prefix or -version
|
||||||
# - projectSite for changes via -prefix
|
# - groupDir for changes via -prefix
|
||||||
projectDir="$prefixDir/$projectDirName"
|
projectDir="$prefixDir/$projectDirName"
|
||||||
projectSite="${WM_PROJECT_SITE:-$prefixDir/site}"
|
groupDir="${WM_PROJECT_SITE:-$prefixDir/site}"
|
||||||
|
|
||||||
|
|
||||||
# Debugging:
|
# Debugging:
|
||||||
@ -311,12 +310,12 @@ fileName="${1#~OpenFOAM/}"
|
|||||||
# Define the various places to be searched:
|
# Define the various places to be searched:
|
||||||
unset dirList
|
unset dirList
|
||||||
case "$optMode" in (*u*) # (U)ser
|
case "$optMode" in (*u*) # (U)ser
|
||||||
dirList="$dirList $HOME/.$projectName/$projectVersion $HOME/.$projectName"
|
dirList="$dirList $userDir/$projectVersion $userDir"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
case "$optMode" in (*g*) # (G)roup == site
|
case "$optMode" in (*g*) # (G)roup == site
|
||||||
dirList="$dirList $projectSite/$projectVersion $projectSite"
|
dirList="$dirList $groupDir/$projectVersion $groupDir"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user