From ec89c8a38d87baeabadab348d72b32d0d6bc83e1 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 12 Nov 2016 09:11:17 +0100 Subject: Adding runtime detection for http2 option in curl create script. Signed-off-by: Daniel Baumann --- share/scripts/curl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'share') diff --git a/share/scripts/curl b/share/scripts/curl index 0cf38e9..feaa1ba 100755 --- a/share/scripts/curl +++ b/share/scripts/curl @@ -142,7 +142,12 @@ then CURL_OPTIONS="--time-cond ${CACHE}/${IMAGE}" fi -curl --http2 --location --progress-bar --user-agent container-tools/${VERSION} ${CURL_OPTIONS} \ +if curl -V | grep -qs http2 +then + CURL_OPTIONS="${CURL_OPTIONS} --https" +fi + +curl --location --progress-bar --user-agent container-tools/${VERSION} ${CURL_OPTIONS} \ "${SERVER}/${IMAGE}" -o "${CACHE}/${IMAGE}" echo "Unpacking ${IMAGE}" -- cgit v1.2.3