aboutsummaryrefslogtreecommitdiffstats
path: root/bash
diff options
context:
space:
mode:
authorGravatar Tom van der Lee <t0m.vd.l33@gmail.com>2015-08-02 17:01:17 +0200
committerGravatar Tom van der Lee <t0m.vd.l33@gmail.com>2015-08-02 17:01:17 +0200
commit558ffdf39689e1c5e201faa4a7e26a1fb45e0f75 (patch)
tree287b70ca37fad44cfe3e96404b913ce170f59133 /bash
parent071ecabdef5b9d60c75fe0d6ecabda769acf9c9f (diff)
downloaddotfiles-558ffdf39689e1c5e201faa4a7e26a1fb45e0f75.tar.gz
dotfiles-558ffdf39689e1c5e201faa4a7e26a1fb45e0f75.tar.bz2
dotfiles-558ffdf39689e1c5e201faa4a7e26a1fb45e0f75.zip
Added pip update as alias of pip upgrade
Diffstat (limited to 'bash')
-rwxr-xr-xbash/.bashrc6
1 files changed, 5 insertions, 1 deletions
diff --git a/bash/.bashrc b/bash/.bashrc
index 90af7a1..bfba031 100755
--- a/bash/.bashrc
+++ b/bash/.bashrc
@@ -110,11 +110,15 @@ fi
110 110
111if exists pip; then 111if exists pip; then
112 pip() { 112 pip() {
113 if [[ "$1" == "upgrade" ]]; then 113 if [[ "$1" == "upgrade" ]] || [[ "$1" == "update" ]]; then
114 outdated=$($usr/bin/pip list --outdated | awk '{ print $1 }') 114 outdated=$($usr/bin/pip list --outdated | awk '{ print $1 }')
115 for pkg in $outdated; do 115 for pkg in $outdated; do
116 $usr/bin/pip install $pkg --upgrade 116 $usr/bin/pip install $pkg --upgrade
117 done 117 done
118
119 if [[ -z "$outdated" ]]; then
120 echo "No updates found"
121 fi
118 else 122 else
119 $usr/bin/pip $@ 123 $usr/bin/pip $@
120 fi 124 fi