Merge "fix warning in install_get_pip"
This commit is contained in:
commit
ee2b5d0c62
@ -53,8 +53,15 @@ function install_get_pip {
|
|||||||
# since and only download if a new version is out -- but only if
|
# since and only download if a new version is out -- but only if
|
||||||
# it seems we downloaded the file originally.
|
# it seems we downloaded the file originally.
|
||||||
if [[ ! -r $LOCAL_PIP || -r $LOCAL_PIP.downloaded ]]; then
|
if [[ ! -r $LOCAL_PIP || -r $LOCAL_PIP.downloaded ]]; then
|
||||||
|
# only test freshness if LOCAL_PIP is actually there,
|
||||||
|
# otherwise we generate a scary warning.
|
||||||
|
local timecond=""
|
||||||
|
if [[ -r $LOCAL_PIP ]]; then
|
||||||
|
timecond="-z $LOCAL_PIP"
|
||||||
|
fi
|
||||||
|
|
||||||
curl --retry 6 --retry-delay 5 \
|
curl --retry 6 --retry-delay 5 \
|
||||||
-z $LOCAL_PIP -o $LOCAL_PIP $PIP_GET_PIP_URL || \
|
$timecond -o $LOCAL_PIP $PIP_GET_PIP_URL || \
|
||||||
die $LINENO "Download of get-pip.py failed"
|
die $LINENO "Download of get-pip.py failed"
|
||||||
touch $LOCAL_PIP.downloaded
|
touch $LOCAL_PIP.downloaded
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user