From: Daniel Arndt Date: Thu, 5 Apr 2018 19:16:26 +0000 (+0200) Subject: Simplify logic for finding the path to astyle X-Git-Tag: v9.0.0-rc1~226^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F6163%2Fhead;p=dealii.git Simplify logic for finding the path to astyle --- diff --git a/contrib/utilities/indent b/contrib/utilities/indent index 2a28b6c1ea..dd0923ff55 100755 --- a/contrib/utilities/indent +++ b/contrib/utilities/indent @@ -30,16 +30,15 @@ # from a build directory. # -# Add the location 'setup_astyle.sh' installs astyle to to the local PATH. -THIS_PATH="$(dirname $0)" # relative -THIS_PATH="$( cd $THIS_PATH && pwd )" # absolutized and normalized -export PATH=$THIS_PATH/programs/astyle/build/gcc/bin/:$PATH - if test ! -d source -o ! -d include -o ! -d examples ; then echo "*** This script must be run from the top-level directory of deal.II." exit 1 fi +# Add the location 'setup_astyle.sh' installs astyle to to the local PATH. +ASTYLE_PATH="$(realpath contrib/utilities)/programs/astyle/build/gcc/bin" +export PATH=$ASTYLE_PATH:$PATH + if test ! -f contrib/styles/astyle.rc ; then echo "*** No style file contrib/styles/astyle.rc found." exit 1