File tree Expand file tree Collapse file tree 2 files changed +35
-0
lines changed
Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/zsh
2+ # This hook is sourced after a new virtualenv is activated.
3+
4+ echo triggered postmkvirtualenv script
5+
6+ create_venv_symlink (){
7+ echo $VIRTUAL_ENV
8+ if [ -d $VIRTUAL_ENV ];
9+ then
10+ echo creating symlink to virtualenvwrapper environemnt
11+
12+ ln -s $VIRTUAL_ENV venv
13+
14+ echo ' ln -s' $VIRTUAL_ENV venv
15+ fi
16+ }
17+
18+ create_venv_symlink
Original file line number Diff line number Diff line change 1+ #! /bin/zsh
2+ # This hook is run after a virtualenv is deleted.
3+ # argument: full path to environment directory
4+
5+ project_name=$( basename $1 )
6+ venv_symlink=$HOME /server/$project_name /venv
7+
8+ echo ' searching for symlink:' $venv_symlink
9+ if [ -L " $venv_symlink " ];
10+ then
11+ echo ' found a symlink to the deleted environment'
12+ echo ' removing it...'
13+ rm -rf $venv_symlink
14+ echo ' rm -rf' $venv_symlink
15+ else
16+ echo ' no symlink traces found'
17+ fi
You can’t perform that action at this time.
0 commit comments