annotate bin/clone-mozbase.sh @ 515:9ddab670f8c4

how binding works
author Jeff Hammel <jhammel@mozilla.com>
date Wed, 18 Sep 2013 12:45:13 -0700
parents ee7e213d12bd
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
284
35b30d8fccac add a function to clone mozbase; for the love of workflow
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
1 #!/bin/bash
35b30d8fccac add a function to clone mozbase; for the love of workflow
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
2
344
f833aef163c6 minor improvements
Jeff Hammel <jhammel@mozilla.com>
parents: 284
diff changeset
3 VENV=virtualenv.py
f833aef163c6 minor improvements
Jeff Hammel <jhammel@mozilla.com>
parents: 284
diff changeset
4
f833aef163c6 minor improvements
Jeff Hammel <jhammel@mozilla.com>
parents: 284
diff changeset
5 if [[ -d "${VIRTUAL_ENV}" ]]
f833aef163c6 minor improvements
Jeff Hammel <jhammel@mozilla.com>
parents: 284
diff changeset
6 then
f833aef163c6 minor improvements
Jeff Hammel <jhammel@mozilla.com>
parents: 284
diff changeset
7 echo "virtualenv: ${VIRTUAL_ENV}"
419
89fa3a440acb creates a virtualenv now
Jeff Hammel <jhammel@mozilla.com>
parents: 344
diff changeset
8 else
89fa3a440acb creates a virtualenv now
Jeff Hammel <jhammel@mozilla.com>
parents: 344
diff changeset
9 if [ -n "${VIRTUAL_ENV}" ]
89fa3a440acb creates a virtualenv now
Jeff Hammel <jhammel@mozilla.com>
parents: 344
diff changeset
10 then
89fa3a440acb creates a virtualenv now
Jeff Hammel <jhammel@mozilla.com>
parents: 344
diff changeset
11 echo "VIRTUAL_ENV defined but not a directory: ${VIRTUAL_ENV}"
89fa3a440acb creates a virtualenv now
Jeff Hammel <jhammel@mozilla.com>
parents: 344
diff changeset
12 exit 1
89fa3a440acb creates a virtualenv now
Jeff Hammel <jhammel@mozilla.com>
parents: 344
diff changeset
13 fi
89fa3a440acb creates a virtualenv now
Jeff Hammel <jhammel@mozilla.com>
parents: 344
diff changeset
14
89fa3a440acb creates a virtualenv now
Jeff Hammel <jhammel@mozilla.com>
parents: 344
diff changeset
15 if ! which ${VENV}
89fa3a440acb creates a virtualenv now
Jeff Hammel <jhammel@mozilla.com>
parents: 344
diff changeset
16 then
89fa3a440acb creates a virtualenv now
Jeff Hammel <jhammel@mozilla.com>
parents: 344
diff changeset
17 echo "${VENV} not found"
89fa3a440acb creates a virtualenv now
Jeff Hammel <jhammel@mozilla.com>
parents: 344
diff changeset
18 exit 1
89fa3a440acb creates a virtualenv now
Jeff Hammel <jhammel@mozilla.com>
parents: 344
diff changeset
19 fi
89fa3a440acb creates a virtualenv now
Jeff Hammel <jhammel@mozilla.com>
parents: 344
diff changeset
20 VIRTUAL_ENV=${PWD}/mozbase
89fa3a440acb creates a virtualenv now
Jeff Hammel <jhammel@mozilla.com>
parents: 344
diff changeset
21 echo "Creating virtualenv: ${VIRTUAL_ENV}"
89fa3a440acb creates a virtualenv now
Jeff Hammel <jhammel@mozilla.com>
parents: 344
diff changeset
22 ${VENV} ${VIRTUAL_ENV}
89fa3a440acb creates a virtualenv now
Jeff Hammel <jhammel@mozilla.com>
parents: 344
diff changeset
23 cd ${VIRTUAL_ENV}
89fa3a440acb creates a virtualenv now
Jeff Hammel <jhammel@mozilla.com>
parents: 344
diff changeset
24 . bin/activate
89fa3a440acb creates a virtualenv now
Jeff Hammel <jhammel@mozilla.com>
parents: 344
diff changeset
25 mkdir -p src
420
433442acf48f add a thing
Jeff Hammel <jhammel@mozilla.com>
parents: 419
diff changeset
26 cd src
344
f833aef163c6 minor improvements
Jeff Hammel <jhammel@mozilla.com>
parents: 284
diff changeset
27 fi
f833aef163c6 minor improvements
Jeff Hammel <jhammel@mozilla.com>
parents: 284
diff changeset
28
284
35b30d8fccac add a function to clone mozbase; for the love of workflow
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
29 git clone git@github.com:k0s/mozbase.git
35b30d8fccac add a function to clone mozbase; for the love of workflow
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
30 cd mozbase
35b30d8fccac add a function to clone mozbase; for the love of workflow
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
31 git remote add mozilla git@github.com:mozilla/mozbase.git
344
f833aef163c6 minor improvements
Jeff Hammel <jhammel@mozilla.com>
parents: 284
diff changeset
32 git pull mozilla master
423
ee7e213d12bd setup_development.py
Jeff Hammel <jhammel@mozilla.com>
parents: 420
diff changeset
33 git push origin master
ee7e213d12bd setup_development.py
Jeff Hammel <jhammel@mozilla.com>
parents: 420
diff changeset
34
ee7e213d12bd setup_development.py
Jeff Hammel <jhammel@mozilla.com>
parents: 420
diff changeset
35 if [ -d "${VIRTUAL_ENV}" ]
ee7e213d12bd setup_development.py
Jeff Hammel <jhammel@mozilla.com>
parents: 420
diff changeset
36 then
ee7e213d12bd setup_development.py
Jeff Hammel <jhammel@mozilla.com>
parents: 420
diff changeset
37 python setup_development.py
ee7e213d12bd setup_development.py
Jeff Hammel <jhammel@mozilla.com>
parents: 420
diff changeset
38 fi