From d9d1336f5695c18efbc40872211a86d9b33a77cd Mon Sep 17 00:00:00 2001 From: brettlangdon Date: Wed, 21 May 2014 09:28:09 -0400 Subject: [PATCH] have setup.sh setup virtualenvwrapper requirements --- postactivate | 8 ++++++++ setup.sh | 6 ++++++ 2 files changed, 14 insertions(+) create mode 100755 postactivate diff --git a/postactivate b/postactivate new file mode 100755 index 0000000..054b2bf --- /dev/null +++ b/postactivate @@ -0,0 +1,8 @@ +#!/usr/bin/zsh +# 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 diff --git a/setup.sh b/setup.sh index aaa8a19..f9488ae 100755 --- a/setup.sh +++ b/setup.sh @@ -34,5 +34,11 @@ for file in $files; do fi done +echo "Setting up virtualenvwrapper" +echo "Creating ~/.env" +mkdir -p ~/.env +echo "Moving postactivate into place" +ln -s $dir/postactivate ~/.env/postactivate + echo "Source ~/.zshrc" . ~/.zshrc