diff options
| author | 2015-08-02 17:01:17 +0200 | |
|---|---|---|
| committer | 2015-08-02 17:01:17 +0200 | |
| commit | 558ffdf39689e1c5e201faa4a7e26a1fb45e0f75 (patch) | |
| tree | 287b70ca37fad44cfe3e96404b913ce170f59133 /bash | |
| parent | 071ecabdef5b9d60c75fe0d6ecabda769acf9c9f (diff) | |
| download | dotfiles-558ffdf39689e1c5e201faa4a7e26a1fb45e0f75.tar.gz dotfiles-558ffdf39689e1c5e201faa4a7e26a1fb45e0f75.tar.bz2 dotfiles-558ffdf39689e1c5e201faa4a7e26a1fb45e0f75.zip | |
Added pip update as alias of pip upgrade
Diffstat (limited to 'bash')
| -rwxr-xr-x | bash/.bashrc | 6 |
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 | ||
| 111 | if exists pip; then | 111 | if 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 |
