diff options
| author | 2015-08-02 15:23:00 +0200 | |
|---|---|---|
| committer | 2015-08-02 15:25:43 +0200 | |
| commit | 071ecabdef5b9d60c75fe0d6ecabda769acf9c9f (patch) | |
| tree | ddd573464682a8563a2359717529c2afca144e5d /bash | |
| parent | c98022c674f2ff2028e94523a947c6995837fa95 (diff) | |
| download | dotfiles-071ecabdef5b9d60c75fe0d6ecabda769acf9c9f.tar.gz dotfiles-071ecabdef5b9d60c75fe0d6ecabda769acf9c9f.tar.bz2 dotfiles-071ecabdef5b9d60c75fe0d6ecabda769acf9c9f.zip | |
Added pip upgrade
Diffstat (limited to 'bash')
| -rwxr-xr-x | bash/.bashrc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/bash/.bashrc b/bash/.bashrc index 389ebb4..90af7a1 100755 --- a/bash/.bashrc +++ b/bash/.bashrc | |||
| @@ -23,6 +23,8 @@ case "$(uname)" in | |||
| 23 | usr="/usr/local" | 23 | usr="/usr/local" |
| 24 | ;; | 24 | ;; |
| 25 | *) | 25 | *) |
| 26 | alias ls="ls --color=auto" | ||
| 27 | usr="/usr" | ||
| 26 | ;; | 28 | ;; |
| 27 | esac | 29 | esac |
| 28 | 30 | ||
| @@ -106,6 +108,19 @@ if exists less; then | |||
| 106 | export PAGER="less" | 108 | export PAGER="less" |
| 107 | fi | 109 | fi |
| 108 | 110 | ||
| 111 | if exists pip; then | ||
| 112 | pip() { | ||
| 113 | if [[ "$1" == "upgrade" ]]; then | ||
| 114 | outdated=$($usr/bin/pip list --outdated | awk '{ print $1 }') | ||
| 115 | for pkg in $outdated; do | ||
| 116 | $usr/bin/pip install $pkg --upgrade | ||
| 117 | done | ||
| 118 | else | ||
| 119 | $usr/bin/pip $@ | ||
| 120 | fi | ||
| 121 | } | ||
| 122 | fi | ||
| 123 | |||
| 109 | if exists liquidprompt; then | 124 | if exists liquidprompt; then |
| 110 | source liquidprompt | 125 | source liquidprompt |
| 111 | fi | 126 | fi |
