diff options
Diffstat (limited to 'bash')
| -rwxr-xr-x | bash/.bashrc | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/bash/.bashrc b/bash/.bashrc index 73e42a9..8f5c09a 100755 --- a/bash/.bashrc +++ b/bash/.bashrc | |||
| @@ -146,22 +146,10 @@ if exists less; then | |||
| 146 | export PAGER="less" | 146 | export PAGER="less" |
| 147 | fi | 147 | fi |
| 148 | 148 | ||
| 149 | # Pip upgrade script | 149 | # Set the virtualenv parameters |
| 150 | if exists pip; then | 150 | if exists virtualenvwrapper.sh; then |
| 151 | pip() { | 151 | export WORKON_HOME=$HOME/.virtualenvs |
| 152 | if [[ "$1" == "upgrade" ]] || [[ "$1" == "update" ]]; then | 152 | source $use/bin/virtualenvwrapper.sh |
| 153 | outdated=$($usr/bin/pip list --outdated | awk '{ print $1 }') | ||
| 154 | for pkg in $outdated; do | ||
| 155 | $usr/bin/pip install $pkg --upgrade | ||
| 156 | done | ||
| 157 | |||
| 158 | if [[ -z "$outdated" ]]; then | ||
| 159 | echo "No updates found" | ||
| 160 | fi | ||
| 161 | else | ||
| 162 | $usr/bin/pip $@ | ||
| 163 | fi | ||
| 164 | } | ||
| 165 | fi | 153 | fi |
| 166 | 154 | ||
| 167 | # Start gnome-keyring-daemon | 155 | # Start gnome-keyring-daemon |
