summaryrefslogtreecommitdiff
path: root/tools/with_venv.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tools/with_venv.sh')
-rwxr-xr-xtools/with_venv.sh12
1 files changed, 9 insertions, 3 deletions
diff --git a/tools/with_venv.sh b/tools/with_venv.sh
index c8d2940..e6e44f5 100755
--- a/tools/with_venv.sh
+++ b/tools/with_venv.sh
@@ -1,4 +1,10 @@
#!/bin/bash
-TOOLS=`dirname $0`
-VENV=$TOOLS/../.venv
-source $VENV/bin/activate && $@
+
+command -v tox > /dev/null 2>&1
+if [ $? -ne 0 ]; then
+ echo 'This script requires "tox" to run.'
+ echo 'You can install it with "pip install tox".'
+ exit 1;
+fi
+
+tox -evenv -- $@