dotfiles

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

commit e003f788f6d3b8cde2b2f9710aa634f3ba9d6e71
parent 406b641391aa92bea883399ab0dd23267092b10d
Author: Alex Balgavy <a.balgavy@gmail.com>
Date:   Sun,  5 Apr 2020 21:36:00 +0200

script to fix virtualenvs after upgrading python


Former-commit-id: f208c405c050b54611fa8186ec4bb1ccd1901dbb
Diffstat:
Ascripts/fix-virtualenv-after-py-upgrade | 16++++++++++++++++
1 file changed, 16 insertions(+), 0 deletions(-)

diff --git a/scripts/fix-virtualenv-after-py-upgrade b/scripts/fix-virtualenv-after-py-upgrade @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +[ -z "$WORKON_HOME" ] && { echo '$WORKON_HOME not set'; exit 1; } +if ! command -v lsvirtualenv &>/dev/null; then + echo "virtualenvwrapper not installed." >&2 + exit 1 +fi +if ! command -v gfind &>/dev/null; then + echo "gfind not installed." >&2 + exit 1 +fi + +for i in $(lsvirtualenv -b); do + gfind "$WORKON_HOME"/"$i" -type l -xtype l -delete; + virtualenv "$WORKON_HOME"/"$i"; +done+ \ No newline at end of file