summaryrefslogtreecommitdiffstats
path: root/share/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'share/scripts')
-rwxr-xr-xshare/scripts/curl7
1 files changed, 6 insertions, 1 deletions
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}"