#!/bin/bash # # Workload Automation v2 for LAVA # # Copyright (C) 2015, Linaro Limited. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # Author: Naresh Kamboju # apt-get -y install python-pip || true export PATH=$PATH:/usr/bin PIP_VERSION=`pip --version | awk '{print $2}'` PIP_OLD_VERSION="1.5.4" if [ "$PIP_VERSION" == $PIP_OLD_VERSION ]; then which pip pip --version sudo chmod -R a+r /usr/local/lib/python2.7/dist-packages sudo find /usr/local/lib/python2.7/dist-packages -type d -exec chmod a+x {} \; sudo pip install --upgrade pip --force sudo pip install --upgrade setuptools export PATH=$PATH:/usr/local/bin which pip pip --version fi exit 0