summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2013-12-05 11:21:22 -0300
committerTomás Touceda <chiiph@leap.se>2013-12-05 11:21:22 -0300
commite42129719630179d842ab6b09528b0220f2d2729 (patch)
treee72fb73b84a50e1cb8476a09c7412af29fbf561c
parent0e8480be2a17416dda34074cc65116e2249d3ee7 (diff)
parent25259ab23887e3ffe9b738aad7701064a6b3b1fc (diff)
Merge remote-tracking branch 'refs/remotes/kali/feature/virtualenvwrapper-tests' into develop
-rwxr-xr-xmail/pkg/tools/with_venvwrapper.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/mail/pkg/tools/with_venvwrapper.sh b/mail/pkg/tools/with_venvwrapper.sh
new file mode 100755
index 00000000..693c0ac9
--- /dev/null
+++ b/mail/pkg/tools/with_venvwrapper.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+#Wraps a command in a virtualenwrapper passed as first argument.
+#Example:
+#with_virtualenvwrapper.sh leap-bitmask ./run_tests.sh
+
+wd=`pwd`
+alias pyver='python -c "import $1;print $1.__path__[0]; print $1.__version__;"'
+
+source `which virtualenvwrapper.sh`
+echo "Activating virtualenv " $1
+echo "------------------------------------"
+workon $1
+cd $wd
+echo "running version: " `pyver leap.bitmask`
+$2 $3 $4 $5