]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Simplify logic for finding the path to astyle 6163/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Thu, 5 Apr 2018 19:16:26 +0000 (21:16 +0200)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Thu, 5 Apr 2018 19:16:26 +0000 (21:16 +0200)
contrib/utilities/indent

index 2a28b6c1eaadba5f55e1f288769f7ae74ca117e0..dd0923ff55b2f572a17bb7064f37c1da712aa5c5 100755 (executable)
 # 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

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.