From 2414cad9a577ad306f0cc6ad55a5918feb095f9e Mon Sep 17 00:00:00 2001 From: Veit Heller Date: Thu, 5 Feb 2015 20:06:33 +0100 Subject: [PATCH] Fixed pip script --- pip-upgrade | 6 +++++- zshrc | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pip-upgrade b/pip-upgrade index 24e6f03..9d47b89 100644 --- a/pip-upgrade +++ b/pip-upgrade @@ -1,8 +1,12 @@ #!/usr/bin/env python import pip +import sys from subprocess import call skip=('setuptools', 'pip', 'python', 'disco', 'AudioPython', 'flann') for dist in pip.get_installed_distributions(skip=skip): - call("pip install --upgrade " + dist.project_name, shell=True) + if(sys.argv[1] == "2") + call("pip install --upgrade " + dist.project_name, shell=True) + elif(sys.argv[1] == "3") + call("pip3.4 install --upgrade " + dist.project_name, shell=True) diff --git a/zshrc b/zshrc index 883ef68..816e557 100644 --- a/zshrc +++ b/zshrc @@ -25,8 +25,8 @@ export LC_ALL=$LANG alias ..="cd .." alias gcc="gcc-4.9" alias g++="g++-4.9" -alias pupgrade="sudo python ~/.pip-upgrade" -alias pupgrade3="sudo python3.4 ~/.pip-upgrade" +alias pupgrade="sudo python ~/.pip-upgrade 2" +alias pupgrade3="sudo python3.4 ~/.pip-upgrade 3" alias cupgrade="cabal update; cabal list --simple-output --installed | awk '{print $1}' | uniq | xargs -I {} cabal install {} --reinstall" alias psg="ps aux | grep -v grep | grep -i -e VSZ -e" alias qmake="/usr/local/Cellar/qt5/5.3.2/bin/qmake"