Browse code

Merge "fix warning in install_get_pip"

Jenkins authored on 2015/10/08 15:04:59
Showing 1 changed files
... ...
@@ -53,8 +53,15 @@ function install_get_pip {
53 53
     # since and only download if a new version is out -- but only if
54 54
     # it seems we downloaded the file originally.
55 55
     if [[ ! -r $LOCAL_PIP || -r $LOCAL_PIP.downloaded ]]; then
56
+        # only test freshness if LOCAL_PIP is actually there,
57
+        # otherwise we generate a scary warning.
58
+        local timecond=""
59
+        if [[ -r $LOCAL_PIP ]]; then
60
+            timecond="-z $LOCAL_PIP"
61
+        fi
62
+
56 63
         curl --retry 6 --retry-delay 5 \
57
-            -z $LOCAL_PIP -o $LOCAL_PIP $PIP_GET_PIP_URL || \
64
+            $timecond -o $LOCAL_PIP $PIP_GET_PIP_URL || \
58 65
             die $LINENO "Download of get-pip.py failed"
59 66
         touch $LOCAL_PIP.downloaded
60 67
     fi