summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xshare/scripts/curl10
1 files 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}"