summaryrefslogtreecommitdiffstats
path: root/resources/scripts/helpers/download/memtest86plus
diff options
context:
space:
mode:
authorFrancis Rowe <info@gluglug.org.uk>2015-07-12 10:29:16 (EDT)
committer Francis Rowe <info@gluglug.org.uk>2015-07-12 10:29:16 (EDT)
commit8353e0be52e9547f5b5f9760eb0d3c94755f4afb (patch)
treed4c1d78a9421fc18e0586b936e7c11ee6249f328 /resources/scripts/helpers/download/memtest86plus
parentd76c58113ee7d569a71b616b5c7d429c01bf298e (diff)
downloadlibreboot-8353e0be52e9547f5b5f9760eb0d3c94755f4afb.zip
libreboot-8353e0be52e9547f5b5f9760eb0d3c94755f4afb.tar.gz
libreboot-8353e0be52e9547f5b5f9760eb0d3c94755f4afb.tar.bz2
download/memtest86plus: verify checksum when downloading
Diffstat (limited to 'resources/scripts/helpers/download/memtest86plus')
-rwxr-xr-xresources/scripts/helpers/download/memtest86plus7
1 files changed, 7 insertions, 0 deletions
diff --git a/resources/scripts/helpers/download/memtest86plus b/resources/scripts/helpers/download/memtest86plus
index c478122..058119c 100755
--- a/resources/scripts/helpers/download/memtest86plus
+++ b/resources/scripts/helpers/download/memtest86plus
@@ -40,6 +40,13 @@ rm -Rf "memtest86+-5.01/"
# download it using wget
wget http://www.memtest.org/download/5.01/memtest86+-5.01.tar.gz
+if [ "$(sha512sum memtest86+-5.01.tar.gz | cut -c1-128)" = "d872db35ef733ec8f49094251f2bf6b98cc80eb06d04044be3aecf28d534f24ba293a08b9979b112dbd07cf27368148939a33a32c7010fc9581a3a5b150c94d7" ]; then
+ printf "Valid checksum for memtest86plus"
+else
+ printf "Invalid checksum for memtest86plus\n"
+ exit 1
+fi
+
# extract it
tar -xzf "memtest86+-5.01.tar.gz"