.env: fix windows compatibility

This commit is contained in:
Maximilian Hils 2015-09-01 02:37:03 +02:00
parent 9389c186ba
commit e8de7595c2
1 changed files with 4 additions and 3 deletions

7
.env
View File

@ -1,5 +1,6 @@
DIR="${0%/*}"
if [ -z "$VIRTUAL_ENV" ] && [ -f "$DIR/../venv.mitmproxy/bin/activate" ]; then
DIR="$( dirname "${BASH_SOURCE[0]}" )"
ACTIVATE_DIR="$(if [ -f "$DIR/../venv.mitmproxy/bin/activate" ]; then echo 'bin'; else echo 'Scripts'; fi;)"
if [ -z "$VIRTUAL_ENV" ] && [ -f "$DIR/../venv.mitmproxy/$ACTIVATE_DIR/activate" ]; then
echo "Activating mitmproxy virtualenv..."
source "$DIR/../venv.mitmproxy/bin/activate"
source "$DIR/../venv.mitmproxy/$ACTIVATE_DIR/activate"
fi