From d09a51b80a68df2bd533b99f51750b0b3f3c94cb Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Wed, 7 Mar 2018 09:40:48 +0100 Subject: [PATCH] macos: tests: use curl of wget is not available --- tests/dl-linux-tarball.bash | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/dl-linux-tarball.bash b/tests/dl-linux-tarball.bash index 5c08b04..fa27e37 100755 --- a/tests/dl-linux-tarball.bash +++ b/tests/dl-linux-tarball.bash @@ -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