From: Daniel Arndt Date: Thu, 5 Apr 2018 15:53:44 +0000 (+0200) Subject: Check the SHA256 checksum for astyle_2.04_linux.tar.gz X-Git-Tag: v9.0.0-rc1~226^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=54f5461610448272b0cfb780f068e7781559e077;p=dealii.git Check the SHA256 checksum for astyle_2.04_linux.tar.gz --- diff --git a/.travis.yml b/.travis.yml index d711326c09..0121779323 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,6 @@ cache: - programs install: - - export PATH=$PWD/programs/astyle/build/gcc/bin:$PATH - ./contrib/utilities/setup_astyle.sh script: diff --git a/contrib/utilities/indent b/contrib/utilities/indent index 30151d0b54..2a28b6c1ea 100755 --- a/contrib/utilities/indent +++ b/contrib/utilities/indent @@ -31,7 +31,7 @@ # # Add the location 'setup_astyle.sh' installs astyle to to the local PATH. -THIS_PATH="$(dirname $0)" # relative +THIS_PATH="$(dirname $0)" # relative THIS_PATH="$( cd $THIS_PATH && pwd )" # absolutized and normalized export PATH=$THIS_PATH/programs/astyle/build/gcc/bin/:$PATH diff --git a/contrib/utilities/setup_astyle.sh b/contrib/utilities/setup_astyle.sh index 1a5dda842f..2c29ded938 100755 --- a/contrib/utilities/setup_astyle.sh +++ b/contrib/utilities/setup_astyle.sh @@ -33,8 +33,13 @@ if [ ! -d "$PRG/astyle" ] then echo "Downloading and installing astyle." mkdir "$PRG/astyle" - wget http://downloads.sourceforge.net/project/astyle/astyle/astyle%202.04/astyle_2.04_linux.tar.gz > /dev/null - tar xfz astyle_2.04_linux.tar.gz -C "$PRG" > /dev/null - cd "$PRG/astyle/build/gcc" - make -j4 > /dev/null + wget https://downloads.sourceforge.net/project/astyle/astyle/astyle%202.04/astyle_2.04_linux.tar.gz > /dev/null + if echo "70b37f4853c418d1e2632612967eebf1bdb93dfbe558c51d7d013c9b4e116b60 astyle_2.04_linux.tar.gz" | sha256sum -c; then + tar xfz astyle_2.04_linux.tar.gz -C "$PRG" > /dev/null + cd "$PRG/astyle/build/gcc" || exit 1 + make -j4 > /dev/null + else + echo "*** The downloaded file has the wrong SHA256 checksum!" + exit 1 + fi fi