From 7264f6eeee1a0771f41295c934cc0d2b36d7addb Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 22 Jul 2017 14:42:11 +0200 Subject: Reshuffeling curl options handling in curl container create script. Signed-off-by: Daniel Baumann --- share/scripts/curl | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/share/scripts/curl b/share/scripts/curl index 0bcfd01..8ceb7c2 100755 --- a/share/scripts/curl +++ b/share/scripts/curl @@ -172,16 +172,18 @@ done echo "Downloading ${IMAGE}" mkdir -p "${CACHE}" -if [ -e "${CACHE}/${IMAGE}" ] -then - CURL_OPTIONS="--time-cond ${CACHE}/${IMAGE}" -fi +CURL_OPTIONS="" if curl -V | grep -qs http2 then CURL_OPTIONS="${CURL_OPTIONS} --http2" fi +if [ -e "${CACHE}/${IMAGE}" ] +then + CURL_OPTIONS="${CURL_OPTIONS} --time-cond ${CACHE}/${IMAGE}" +fi + for FILE in "${SERVER}/${IMAGE}" "${SERVER}/${IMAGE}.sha512" do if curl --fail --head --output /dev/null --silent "${FILE}" -- cgit v1.2.3