Browse code

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

Attila Fazekas authored on 2013/10/07 14:29:27
Showing 1 changed files
... ...
@@ -50,10 +50,12 @@ GetDistro
50 50
 echo "Distro: $DISTRO"
51 51
 
52 52
 function get_versions() {
53
-    PIP=$(which pip 2>/dev/null || which pip-python 2>/dev/null)
53
+    PIP=$(which pip 2>/dev/null || which pip-python 2>/dev/null || true)
54 54
     if [[ -n $PIP ]]; then
55 55
         PIP_VERSION=$($PIP --version | awk '{ print $2}')
56 56
         echo "pip: $PIP_VERSION"
57
+    else
58
+        echo "pip: Not Installed"
57 59
     fi
58 60
 }
59 61