curl dying ends up being a really unclear failure condition, and
hard to fingerprint in the gate. We should make this much more
explicit when we die.
Also, don't trust the upstream filename, because all the rest of
our logic would break if it changes anyway.
Change-Id: Ibc2a96b33471d24c597af0d7af896fb10523156f
| ... | ... |
@@ -25,6 +25,7 @@ source $TOP_DIR/functions |
| 25 | 25 |
FILES=$TOP_DIR/files |
| 26 | 26 |
|
| 27 | 27 |
PIP_GET_PIP_URL=https://bootstrap.pypa.io/get-pip.py |
| 28 |
+LOCAL_PIP="$FILES/$(basename $PIP_GET_PIP_URL)" |
|
| 28 | 29 |
|
| 29 | 30 |
GetDistro |
| 30 | 31 |
echo "Distro: $DISTRO" |
| ... | ... |
@@ -41,12 +42,11 @@ function get_versions {
|
| 41 | 41 |
|
| 42 | 42 |
|
| 43 | 43 |
function install_get_pip {
|
| 44 |
- if [[ ! -r $FILES/get-pip.py ]]; then |
|
| 45 |
- (cd $FILES; \ |
|
| 46 |
- curl -O $PIP_GET_PIP_URL; \ |
|
| 47 |
- ) |
|
| 44 |
+ if [[ ! -r $LOCAL_PIP ]]; then |
|
| 45 |
+ curl -o $LOCAL_PIP $PIP_GET_PIP_URL || \ |
|
| 46 |
+ die $LINENO "Download of get-pip.py failed" |
|
| 48 | 47 |
fi |
| 49 |
- sudo -E python $FILES/get-pip.py |
|
| 48 |
+ sudo -E python $LOCAL_PIP |
|
| 50 | 49 |
} |
| 51 | 50 |
|
| 52 | 51 |
|