dotfiles

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

commit 19e5e176322c9cf11426cb7dcca79cae41f2373c
parent 17a1db82247e7c53ea5ccd3aab7a57f9cae94608
Author: Alex Balgavy <a.balgavy@gmail.com>
Date:   Sun, 26 Jul 2020 12:43:24 +0200

Fix virtualenv fixer


Former-commit-id: d586e3f316aa76865ad26dd6dab506037e0b5964
Diffstat:
Mscripts/fix-virtualenv-after-py-upgrade | 11++++-------
1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/scripts/fix-virtualenv-after-py-upgrade b/scripts/fix-virtualenv-after-py-upgrade @@ -1,15 +1,12 @@ #!/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"; +for i in $(find $WORKON_HOME -maxdepth 1 -type d -mindepth 1); do + gfind "$i" -type l -xtype l -delete; + virtualenv "$i"; done \ No newline at end of file