From 3983347657c81064d94105ece1a929a32ea6b8c6 Mon Sep 17 00:00:00 2001 From: Veit Heller Date: Wed, 4 Feb 2015 17:24:24 +0100 Subject: [PATCH] Added pip and cabal upgrade --- Makefile | 1 + pip-upgrade | 5 +++++ zshrc | 7 +++++++ 3 files changed, 13 insertions(+) create mode 100644 pip-upgrade diff --git a/Makefile b/Makefile index cd4f9ed..96e84e5 100644 --- a/Makefile +++ b/Makefile @@ -18,3 +18,4 @@ vim: zsh: cp zshrc ~/.zshrc + cp pip-upgrade ~/.pip-upgrade diff --git a/pip-upgrade b/pip-upgrade new file mode 100644 index 0000000..1a88434 --- /dev/null +++ b/pip-upgrade @@ -0,0 +1,5 @@ +import pip +from subprocess import call + +for dist in pip.get_installed_distributions(): + call("pip install --upgrade " + dist.project_name, shell=True) diff --git a/zshrc b/zshrc index b3d4d02..0acdf50 100644 --- a/zshrc +++ b/zshrc @@ -25,6 +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 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" alias lupdate="/usr/local/Cellar/qt5/5.3.2/bin/lupdate" @@ -133,6 +135,7 @@ save_dotfiles(){ cp ~/.pythonrc ${DOTPATH}pythonrc cp ~/.vimrc ${DOTPATH}vimrc cp ~/.zshrc ${DOTPATH}zshrc + cp ~/.pip-upgrade ${DOTPATH}pip-upgrade } @@ -191,11 +194,15 @@ osx_upgrade_local () { popd osascript -e 'tell app "TextMate" to reload bundles' fi + pupgrade + cupgrade } debian_upgrade_local (){ sudo apt-get update && sudo apt-get -u upgrade sudo apt-get clean + pupgrade + cupgrade } osx_upgrade_remote (){