From: Timo Heister Date: Sat, 24 Jul 2021 21:48:37 +0000 (-0400) Subject: fix enable.sh for zsh X-Git-Tag: v9.3.3-r1~1^2~13^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F247%2Fhead;p=candi.git fix enable.sh for zsh default on OSX is zsh instead of bash and our enable.sh uses a bash internal. This should work for bash and zsh. --- diff --git a/candi.sh b/candi.sh index 3d5bf2d..c7f766a 100755 --- a/candi.sh +++ b/candi.sh @@ -1023,7 +1023,9 @@ cat > ${CONFIGURATION_PATH}/enable.sh <<"EOF" # find path of script: pushd . >/dev/null -P="${BASH_SOURCE[0]}";cd `dirname $P`;P=`pwd`; +P="${BASH_SOURCE[0]:-${(%):-%x}}"; +P=`dirname ${P}`; +P=`cd ${P};pwd`; popd >/dev/null for f in $P/*