changeset 419:89fa3a440acb

creates a virtualenv now
author Jeff Hammel <jhammel@mozilla.com>
date Mon, 05 Aug 2013 14:54:03 -0700
parents dad9f18da036
children 433442acf48f
files bin/clone-mozbase.sh
diffstat 1 files changed, 18 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/bin/clone-mozbase.sh	Mon Aug 05 14:20:53 2013 -0700
+++ b/bin/clone-mozbase.sh	Mon Aug 05 14:54:03 2013 -0700
@@ -5,6 +5,24 @@
 if [[ -d "${VIRTUAL_ENV}" ]]
 then
     echo "virtualenv: ${VIRTUAL_ENV}"
+else
+    if [ -n "${VIRTUAL_ENV}" ]
+    then
+        echo "VIRTUAL_ENV defined but not a directory: ${VIRTUAL_ENV}"
+        exit 1
+    fi
+
+    if ! which ${VENV}
+    then
+        echo "${VENV} not found"
+        exit 1
+    fi
+    VIRTUAL_ENV=${PWD}/mozbase
+    echo "Creating virtualenv: ${VIRTUAL_ENV}"
+    ${VENV} ${VIRTUAL_ENV}
+    cd ${VIRTUAL_ENV}
+    . bin/activate
+    mkdir -p src
 fi
 
 git clone git@github.com:k0s/mozbase.git