From a0cd3d9353e83ed93efbba0a0afc2a6c5c55a8dd Mon Sep 17 00:00:00 2001 From: Gerhard Holzinger Date: Fri, 29 Jul 2016 09:21:41 +0200 Subject: [PATCH 1/2] fixed bashrc file to recognize the point releases of OpenFOAM-2.4 and OpenFOAM-3 --- src/lagrangian/cfdemParticle/etc/bashrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lagrangian/cfdemParticle/etc/bashrc b/src/lagrangian/cfdemParticle/etc/bashrc index c16b40a7..f8244177 100755 --- a/src/lagrangian/cfdemParticle/etc/bashrc +++ b/src/lagrangian/cfdemParticle/etc/bashrc @@ -240,9 +240,9 @@ else fi # detect OF version -if [ $WM_PROJECT_VERSION == "3.0.x" ]; then +if [ $WM_PROJECT_VERSION == "3.0.x" ] || [ $WM_PROJECT_VERSION == "3.0.0" ] || [ $WM_PROJECT_VERSION == "3.0.1" ]; then export CFDEM_WM_PROJECT_VERSION=30 -elif [ $WM_PROJECT_VERSION == "2.4.x" ]; then +elif [ $WM_PROJECT_VERSION == "2.4.x" ] || [ $WM_PROJECT_VERSION == "2.4.0" ]; then export CFDEM_WM_PROJECT_VERSION=24 elif [[ $WM_PROJECT_VERSION == "3.2" && $WM_FORK == "extend" ]]; then export CFDEM_WM_PROJECT_VERSION=132 From ef2cf08598c4708c046a76b4b5cb56c38688a280 Mon Sep 17 00:00:00 2001 From: Gerhard Holzinger Date: Fri, 29 Jul 2016 09:41:03 +0200 Subject: [PATCH 2/2] Support the point releases of OpenFOAM-2.4 and OpenFOAM-3 Changed the filenames of additionalLibs to accommodate also the point releases Added a new variable ADD_LIB_VERSION to the bashrc to determine the correct version of additionalLibs ADD_LIB_VERSION contains the first three characters of WM_PROJECT_VERSION --- .../etc/{additionalLibs_2.4.x => additionalLibs_2.4} | 0 .../etc/{additionalLibs_3.0.x => additionalLibs_3.0} | 0 src/lagrangian/cfdemParticle/etc/bashrc | 3 ++- 3 files changed, 2 insertions(+), 1 deletion(-) rename src/lagrangian/cfdemParticle/etc/{additionalLibs_2.4.x => additionalLibs_2.4} (100%) rename src/lagrangian/cfdemParticle/etc/{additionalLibs_3.0.x => additionalLibs_3.0} (100%) diff --git a/src/lagrangian/cfdemParticle/etc/additionalLibs_2.4.x b/src/lagrangian/cfdemParticle/etc/additionalLibs_2.4 similarity index 100% rename from src/lagrangian/cfdemParticle/etc/additionalLibs_2.4.x rename to src/lagrangian/cfdemParticle/etc/additionalLibs_2.4 diff --git a/src/lagrangian/cfdemParticle/etc/additionalLibs_3.0.x b/src/lagrangian/cfdemParticle/etc/additionalLibs_3.0 similarity index 100% rename from src/lagrangian/cfdemParticle/etc/additionalLibs_3.0.x rename to src/lagrangian/cfdemParticle/etc/additionalLibs_3.0 diff --git a/src/lagrangian/cfdemParticle/etc/bashrc b/src/lagrangian/cfdemParticle/etc/bashrc index f8244177..23026a5b 100755 --- a/src/lagrangian/cfdemParticle/etc/bashrc +++ b/src/lagrangian/cfdemParticle/etc/bashrc @@ -55,7 +55,8 @@ export CFDEM_LIB_COMP_NAME=lagrangianCFDEMcomp-$CFDEM_VERSION-$WM_PROJECT_VERSIO #check if additional libraries should be compiled together with solvers if [[ $CFDEM_ADD_LIBS_NAME == "" ]]; then - export CFDEM_ADD_LIBS_NAME=additionalLibs_$WM_PROJECT_VERSION + export ADD_LIB_VERSION=$(echo $WM_PROJECT_VERSION | head -c 3) + export CFDEM_ADD_LIBS_NAME=additionalLibs_$ADD_LIB_VERSION echo "using CFDEM_ADD_LIBS_NAME=$CFDEM_ADD_LIBS_NAME ." else echo "using CFDEM_ADD_LIBS_NAME=$CFDEM_ADD_LIBS_NAME defined by user."