install_pip script fails if pip was not installed

'set -o errexit' recently added to the pip installer script, which causes
the script fail when it does not able to find an already installed pip.

This change handles the situation when pip is not installed.

Change-Id: I18a42d13c4be6699db21ec5b6a095a88a199912d
This commit is contained in:
Attila Fazekas 2013-10-07 07:29:27 +02:00
parent d2cd07b565
commit 46ea723868

View File

@ -50,10 +50,12 @@ GetDistro
echo "Distro: $DISTRO"
function get_versions() {
PIP=$(which pip 2>/dev/null || which pip-python 2>/dev/null)
PIP=$(which pip 2>/dev/null || which pip-python 2>/dev/null || true)
if [[ -n $PIP ]]; then
PIP_VERSION=$($PIP --version | awk '{ print $2}')
echo "pip: $PIP_VERSION"
else
echo "pip: Not Installed"
fi
}