aboutsummaryrefslogtreecommitdiff
path: root/tests/dl-linux-tarball.bash
blob: 5fbd2b42d6259226c4ea0e71d0b6372811181c36 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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