From 502c9ceb71df8482d7affc466a096ae17b6feee0 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Mon, 13 Mar 2017 19:41:38 +0000 Subject: [PATCH] etc/bashrc: Updated to better support zsh Resolves patch request https://bugs.openfoam.org/view.php?id=2490 --- etc/bashrc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/etc/bashrc b/etc/bashrc index 0e88166e7c..6ab6418c92 100644 --- a/etc/bashrc +++ b/etc/bashrc @@ -2,7 +2,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | -# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation +# \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation # \\/ M anipulation | #------------------------------------------------------------------------------ # License @@ -42,8 +42,8 @@ export WM_PROJECT_VERSION=dev # # Please set to the appropriate path if the default is not correct. # -[ $BASH_SOURCE ] && \ -export FOAM_INST_DIR=$(cd $(dirname $BASH_SOURCE)/../.. && pwd -P) || \ +[ ${BASH_SOURCE:-$0} ] && \ +export FOAM_INST_DIR=$(cd $(dirname ${BASH_SOURCE:-$0})/../.. && pwd -P) || \ export FOAM_INST_DIR=$HOME/$WM_PROJECT # export FOAM_INST_DIR=~$WM_PROJECT # export FOAM_INST_DIR=/opt/$WM_PROJECT