dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

fix-virtualenv-after-py-upgrade (382B)


      1 #!/usr/bin/env bash
      2 # Upgrading python on macOS sometimes breaks virtualenvs. This fixes them again.
      3 [ -z "$WORKON_HOME" ] && { echo '$WORKON_HOME not set'; exit 1; }
      4 if ! command -v gfind &>/dev/null; then
      5   echo "gfind not installed." >&2
      6   exit 1
      7 fi
      8 
      9 for i in $(find $WORKON_HOME -maxdepth 1 -type d -mindepth 1); do
     10   gfind "$i" -type l -xtype l -delete;
     11   virtualenv "$i";
     12 done