diff options
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 |
