Makefile: add support for curl
authorTomáš Golembiovský <tgolembi@redhat.com>
Tue, 5 Dec 2017 13:57:56 +0000 (14:57 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Tue, 5 Dec 2017 15:59:28 +0000 (15:59 +0000)
Support curl as an alternative to wget.

Signed-off-by: Tomáš Golembiovský <tgolembi@redhat.com>
Makefile

index 7a22647..c38dcb1 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -59,9 +59,11 @@ Makefile.tools:
        fi
        @if wget --help >/dev/null 2>&1; then \
            echo 'DOWNLOAD=wget -O -' >> $@-t; \
+       elif curl --help >/dev/null 2>&1; then \
+           echo 'DOWNLOAD=curl -L' >> $@-t; \
        else \
-           echo -n "‘wget’ not installed or not working."; \
-           echo "Install the ‘wget’ package."; \
+           echo -n "‘wget’ nor ‘curl’ is installed and working."; \
+           echo "Install the ‘wget’ or ‘curl’ package."; \
            exit 1; \
        fi
        @mv $@-t $@