Created
November 5, 2013 19:46
-
-
Save cwood/7324980 to your computer and use it in GitHub Desktop.
Revisions
-
cwood created this gist
Nov 5, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ #!/bin/zsh autoload -U colors && colors if [[ -z $1 ]]; then read "upgradePackage?Which pacakge to upgrade? " else upgradePackage=$1 fi VIRTUALENV_INSTALLS="/var/virtualenvs" VIRTUALENV_HOMES=(`find $VIRTUALENV_INSTALLS -maxdepth 1 -type d`) for virtualenv in $VIRTUALENV_HOMES; do if [[ -e "$virtualenv/bin/activate" ]]; then echo "Working on ${fg[blue]}${virtualenv}${reset_color}" source $virtualenv/bin/activate pip install --upgrade $upgradePackage deactivate fi done