diff .bashrc @ 651:66a7729aa049

fix this function
author Jeff Hammel <k0scist@gmail.com>
date Fri, 28 Mar 2014 18:55:49 -0700
parents fbfc02ea7d8e
children 60952012be78
line wrap: on
line diff
--- a/.bashrc	Mon Mar 24 13:54:24 2014 -0700
+++ b/.bashrc	Fri Mar 28 18:55:49 2014 -0700
@@ -424,7 +424,8 @@
     then
         return 1
     fi
-    VENV_PATH=$(which ${VIRTUALENV} &> /dev/null)
+    VENV_PATH=$(which ${VIRTUALENV})
+    echo VENV_PATH=${VENV_PATH}
 
     # update virtualenv if possible
     DIRNAME=$(dirname ${VENV_PATH})
@@ -435,10 +436,11 @@
         cd --
     fi
 
-
     # for each virtualenv given...
     for i in $@
     do
+        OLD_PWD=${PWD}
+        echo "${i} : OLDPWD=${OLD_PWD}"
         # ...recreate it...
         ${VIRTUALENV} --clear "${i}"
 
@@ -446,7 +448,6 @@
         if [ -d "${SRCDIR}" ]
         then
             . "${i}/bin/activate"
-            OLDPWD=${PWD}
             cd "${SRCDIR}"
             for j in *
             do
@@ -457,8 +458,9 @@
                     cd ..
                 fi
             done
-            cd "${OLDPWD}"
         fi
+        echo "cd OLD_PWD=${OLD_PWD}"
+        cd ${OLD_PWD}
     done
 }