diff options
author | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2015-05-21 13:15:55 +0200 |
---|---|---|
committer | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2015-05-21 13:15:55 +0200 |
commit | b2f87b9424f825874732c160de109d4385ae59e5 (patch) | |
tree | b8cc1a3c98daad59ff43302464d96155fe2f1bbb /.env | |
parent | 634f2e2c24ae2bb807c26c9e13cd35956bc9b79d (diff) | |
download | mitmproxy-b2f87b9424f825874732c160de109d4385ae59e5.tar.gz mitmproxy-b2f87b9424f825874732c160de109d4385ae59e5.tar.bz2 mitmproxy-b2f87b9424f825874732c160de109d4385ae59e5.zip |
improve autoenv script
* properly quote DIR variable
(it might contain spaces)
* use builtin string magic instead of `dirname`
Diffstat (limited to '.env')
-rw-r--r-- | .env | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ -DIR=`dirname $0` -if [ -z "$VIRTUAL_ENV" ] && [ -f $DIR/../venv.mitmproxy/bin/activate ]; then +DIR="${0%/*}" +if [ -z "$VIRTUAL_ENV" ] && [ -f "$DIR/../venv.mitmproxy/bin/activate" ]; then echo "Activating mitmproxy virtualenv..." - source $DIR/../venv.mitmproxy/bin/activate + source "$DIR/../venv.mitmproxy/bin/activate" fi |