macos: tests: use curl of wget is not available

This commit is contained in:
Jakob Unterwurzacher 2018-03-07 09:40:48 +01:00
parent c458d99aa9
commit d09a51b80a
1 changed files with 6 additions and 2 deletions

View File

@ -3,6 +3,7 @@
# This script checks the size of /tmp/linux-3.0.tar.gz and downloads
# a fresh copy if the size is incorrect or the file is missing.
URL=https://cdn.kernel.org/pub/linux/kernel/v3.0/linux-3.0.tar.gz
TGZ=/tmp/linux-3.0.tar.gz
SIZE_WANT=96675825
@ -18,6 +19,9 @@ fi
if [[ $SIZE_ACTUAL -ne $SIZE_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
if command -v wget > /dev/null ; then
wget -nv --show-progress -c -O $TGZ $URL
else
curl -o $TGZ $URL
fi
fi