summaryrefslogtreecommitdiff
path: root/pkg/tools/with_venvwrapper.sh
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2013-12-06 15:48:54 -0300
committerTomás Touceda <chiiph@leap.se>2013-12-06 15:48:54 -0300
commitdc45a6098b798a2866c2ab6af097307913cf542b (patch)
tree1601c24e2cd0d390532727a1206cffd189d01b8f /pkg/tools/with_venvwrapper.sh
parent46ccf635c44aeffb75c95845b8b4cc9ce2b1c4a4 (diff)
parent037a5c59f36a711d7588eab06810a9ffdf2474b0 (diff)
Merge branch 'release-0.3.8'0.3.8
Diffstat (limited to 'pkg/tools/with_venvwrapper.sh')
-rwxr-xr-xpkg/tools/with_venvwrapper.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/pkg/tools/with_venvwrapper.sh b/pkg/tools/with_venvwrapper.sh
new file mode 100755
index 0000000..693c0ac
--- /dev/null
+++ b/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