summaryrefslogtreecommitdiffstats
path: root/share/scripts
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@open-infrastructure.net>2016-11-12 08:11:17 +0000
committerDaniel Baumann <daniel.baumann@open-infrastructure.net>2016-11-22 14:29:28 +0000
commitec89c8a38d87baeabadab348d72b32d0d6bc83e1 (patch)
treed78f3f0abb8c6098cc5b59a5aa952deabe9abbbb /share/scripts
parentReleasing version 20161112. (diff)
downloadcompute-tools-ec89c8a38d87baeabadab348d72b32d0d6bc83e1.tar.xz
compute-tools-ec89c8a38d87baeabadab348d72b32d0d6bc83e1.zip
Adding runtime detection for http2 option in curl create script.
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
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}"