diff .bashrc @ 296:ee3c1b65d6d1

random fixes
author Jeff Hammel <jhammel@mozilla.com>
date Sat, 11 May 2013 06:50:40 -0700
parents e2564dd51334
children 266d6b337373
line wrap: on
line diff
--- a/.bashrc	Sat May 11 04:16:56 2013 -0700
+++ b/.bashrc	Sat May 11 06:50:40 2013 -0700
@@ -264,6 +264,33 @@
     done
 }
 
+recreate-venv() {
+    # recreate a virtualenv
+    VIRTUALENV="virtualenv.py"
+    for i in $@
+    do
+        ${VIRTUALENV} --clear "${i}"
+
+        SRCDIR="${i}"/src
+        if [ -d "${SRCDIR}" ]
+        then
+            . "${i}/bin/activate"
+            OLDPWD=${PWD}
+            cd "${SRCDIR}"
+            for j in *
+            do
+                if [ -e "${j}"/setup.py ]
+                then
+                    cd "${j}"
+                    python setup.py develop
+                    cd ..
+                fi
+            done
+            cd "${OLDPWD}"
+        fi
+    done
+}
+
 ### functions for version control systems
 
 svndance(){