summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2013-12-05 11:24:19 -0300
committerTomás Touceda <chiiph@leap.se>2013-12-05 11:24:19 -0300
commit820939f3ec4d49c45234a7c5eb6d4ab2cbe5c3ee (patch)
tree416add0712322b962b01913d053bfd63a2467f5e /common
parent38960aa71709556dee0b84a279186027619c1c18 (diff)
parent8807335119d43c24f5d18c9fa69ad0f9f6e458f2 (diff)
Merge remote-tracking branch 'refs/remotes/kali/feature/add-venwwrapper-script' into develop
Diffstat (limited to 'common')
-rwxr-xr-xcommon/pkg/tools/with_venvwrapper.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/common/pkg/tools/with_venvwrapper.sh b/common/pkg/tools/with_venvwrapper.sh
new file mode 100755
index 00000000..b62bc10f
--- /dev/null
+++ b/common/pkg/tools/with_venvwrapper.sh
@@ -0,0 +1,19 @@
+#!/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: "
+echo `pyver leap.bitmask`
+echo `pyver leap.soledad.common`
+echo `pyver leap.keymanager`
+$2 $3 $4 $5