From 423ac54eabed1a9df7cd906686a8499f4cf69719 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Fri, 4 Nov 2016 13:09:18 +0000 Subject: [PATCH] etc/bashrc: Added support for sourcing etc/bashrc with relative path Patch contributed by Bruno Santos Resolves bug-report http://bugs.openfoam.org/view.php?id=2310 --- etc/bashrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/bashrc b/etc/bashrc index 88fb83ebd..b5e1745aa 100644 --- a/etc/bashrc +++ b/etc/bashrc @@ -43,7 +43,7 @@ export WM_PROJECT_VERSION=4.x # 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=$(cd $(dirname $BASH_SOURCE)/../.. && pwd -P) || \ export FOAM_INST_DIR=$HOME/$WM_PROJECT # export FOAM_INST_DIR=~$WM_PROJECT # export FOAM_INST_DIR=/opt/$WM_PROJECT