spack/var/spack/repos/builtin/packages/openfoam-org/41-etc.patch
Mark Olesen 76b9563dc3 new OpenFOAM June 2017 release: OpenFOAM-v1706 (#4652)
- renamed develop version from 'plus' to 'develop'

- patches now prefixed by corresponding OpenFOAM version number.
  This makes it easier to sort and see what old/junk exists.

- remove MPI_BUFFER_SIZEk env variable (for all openfoam variants).
  The OpenFOAM shell setup addresses this and there is no reason
  to pollute the module environment at this stage.
2017-07-03 17:54:50 -05:00

26 lines
992 B
Diff

--- OpenFOAM-4.x.orig/etc/bashrc 2016-10-16 16:11:45.000000000 +0200
+++ OpenFOAM-4.x/etc/bashrc 2017-03-24 12:41:25.233267894 +0100
@@ -43,17 +43,17 @@
# Please set to the appropriate path if the default is not correct.
#
[ $BASH_SOURCE ] && \
-export FOAM_INST_DIR=$(cd ${BASH_SOURCE%/*/*/*} && pwd -P) || \
-export FOAM_INST_DIR=$HOME/$WM_PROJECT
-# export FOAM_INST_DIR=~$WM_PROJECT
-# export FOAM_INST_DIR=/opt/$WM_PROJECT
-# export FOAM_INST_DIR=/usr/local/$WM_PROJECT
+FOAM_INST_DIR=$(\cd $(dirname $BASH_SOURCE)/../.. && \pwd -P) || \
+FOAM_INST_DIR=$HOME/$WM_PROJECT
+# FOAM_INST_DIR=/opt/$WM_PROJECT
+# FOAM_INST_DIR=/usr/local/$WM_PROJECT
#
# Build foamyHexMesh
export FOAMY_HEX_MESH=yes
#
# END OF (NORMAL) USER EDITABLE PART
################################################################################
+export FOAM_INST_DIR
# The default environment variables below can be overridden in a prefs.sh file
# located in ~/.OpenFOAM/$WM_PROJECT_VERSION, ~/.OpenFOAM,