From 53555fec1c1db206e02d3a32bf65c43db56e04cc Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Tue, 3 Jan 2017 14:17:19 +0100 Subject: tests: factor out dl-linux-tarball.bash This will be also used by the reverse benchmarks. --- tests/dl-linux-tarball.bash | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 tests/dl-linux-tarball.bash (limited to 'tests/dl-linux-tarball.bash') diff --git a/tests/dl-linux-tarball.bash b/tests/dl-linux-tarball.bash new file mode 100755 index 0000000..5fbd2b4 --- /dev/null +++ b/tests/dl-linux-tarball.bash @@ -0,0 +1,15 @@ +#!/bin/bash -eu +# +# This script checks the MD5 sum of /tmp/linux-3.0.tar.gz and downloads +# a fresh copy if its incorrect or the file is missing. + +TGZ=/tmp/linux-3.0.tar.gz + +MD5_ACTUAL="$(md5sum $TGZ | cut -f1 -d' ')" +MD5_WANT="f7e6591d86a9dbe123dfd1a0be054e7f" + +if [[ $MD5_ACTUAL != $MD5_WANT ]]; then + echo "Downloading linux-3.0.tar.gz" + wget -nv --show-progress -c -O $TGZ \ + https://cdn.kernel.org/pub/linux/kernel/v3.0/linux-3.0.tar.gz +fi -- cgit v1.2.3