From e17e20289ab5caeed4eaac24184711704f2c396b Mon Sep 17 00:00:00 2001 From: "Bernhard F.W. Gschaider" Date: Thu, 11 Jul 2013 18:22:11 +0200 Subject: [PATCH] Add the possibility to inject variables BEFORE WM_PROJECT_DIR is set --HG-- branch : bgschaid/minorAdditionsBranch --- .gitignore | 3 +++ .hgignore | 3 +++ etc/bashrc | 8 ++++++++ 3 files changed, 14 insertions(+) diff --git a/.gitignore b/.gitignore index 88b59834b..10a017af9 100644 --- a/.gitignore +++ b/.gitignore @@ -85,6 +85,9 @@ etc/bashrc etc/settings.csh etc/settings.sh +# make sure that this settings file is not used +etc/bashrc.preset + # The following files are blacklisted because of a DMCA complaint by ANSYS. src/lduSolvers/tools/PriorityArray.C src/lduSolvers/tools/PriorityArray.H diff --git a/.hgignore b/.hgignore index b256cc978..ff3ef0f1f 100644 --- a/.hgignore +++ b/.hgignore @@ -77,6 +77,9 @@ PlyParser_FoamFileParser_parsetab.py # .gitignore .timeStamp +# make sure that this settings file is not used +etc/bashrc.preset + #Test-Harness generated stuff testHarness/OpenFOAM/1.6-ext/runDir/tutorialsTestSuites_oneTimeStep testHarness/OpenFOAM/1.6-ext/runDir/Testing diff --git a/etc/bashrc b/etc/bashrc index 70f6f6ee8..00d8ff419 100644 --- a/etc/bashrc +++ b/etc/bashrc @@ -32,6 +32,14 @@ # #------------------------------------------------------------------------------ +prefSettingFile=$0.preset +if [ -f $prefSettingFile ] +then + # echo "Found presettings $prefSettingFile" + . $prefSettingFile +fi + + export WM_PROJECT=OpenFOAM export WM_PROJECT_VERSION=1.6-ext if [ -n "$WM_PROJECT_VERSION_ADDITION" ]