]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Check the SHA256 checksum for astyle_2.04_linux.tar.gz
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Thu, 5 Apr 2018 15:53:44 +0000 (17:53 +0200)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Thu, 5 Apr 2018 15:53:44 +0000 (17:53 +0200)
.travis.yml
contrib/utilities/indent
contrib/utilities/setup_astyle.sh

index d711326c099efdfef67eefbec67be82e942c9f4b..0121779323260a3608c8e2459a91f92b7f52e3e2 100644 (file)
@@ -13,7 +13,6 @@ cache:
     - programs
 
 install:
-    - export PATH=$PWD/programs/astyle/build/gcc/bin:$PATH
     - ./contrib/utilities/setup_astyle.sh 
 
 script: 
index 30151d0b548a618cf76d5d473f462b4c32f1ec05..2a28b6c1eaadba5f55e1f288769f7ae74ca117e0 100755 (executable)
@@ -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
 
index 1a5dda842ff6c8206323537a7e80e9605e1cc597..2c29ded93851680a2512b1d2cceaab43e546bf8c 100755 (executable)
@@ -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

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.