From 8fdb7825dfea69c9c291d45689ecda23d001bd22 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Thu, 5 Apr 2018 21:16:26 +0200 Subject: [PATCH] Simplify logic for finding the path to astyle --- contrib/utilities/indent | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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 -- 2.39.5