Browse Source

have postactive look in multiple locations

pull/1/head
Brett Langdon 11 years ago
parent
commit
13f60c9984
1 changed files with 10 additions and 4 deletions
  1. +10
    -4
      postactivate

+ 10
- 4
postactivate View File

@ -2,7 +2,13 @@
# This hook is run after every virtualenv is activated.
proj_name=$(echo $VIRTUAL_ENV|awk -F'/' '{print $NF}')
if [ -d ~/src/$proj_name ]
then
cd ~/src/$proj_name
fi
locs=("src" "simpleoncall" "underdog")
for loc in "${locs[@]}";
do
if [ -d ~/$loc/$proj_name ]
then
cd ~/$loc/$proj_name
break
fi
done;
rehash

Loading…
Cancel
Save