Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 41 lines (33 sloc) 0.813 kb
3d1295c1 »
2012-01-19 more boilerplate
1 #!/bin/bash
2
3 TOP_DIR=$(readlink -f $(dirname $BASH_SOURCE))
4
5 # Poject name
6 PROJ_NAME='vimdown'
9a3d0a0b »
2012-02-03 Remove leading/trailing blank lines from code blocks.
7 PROJ_VER='1.1.1'
3d1295c1 »
2012-01-19 more boilerplate
8 # Name of the virtualenv
9 VENV_NAME='.venv'
10
11 function vactivate()
12 {
13 echo "Activating virtualenv $VENV_NAME"
14 cd $TOP_DIR
15 . "$VENV_NAME/bin/activate"
16 cd -
17 } #vactivate()
18
19 function buildenv()
20 {
21 echo "Building and Activating virtualenv $VENV_NAME, then starting the Django project."
22
23 oldir=$PWD
24 cd $TOP_DIR
25
26 if [[ ! -d "$VENV_NAME" ]]; then
27 # Install a virutalvenv
28 test -d "$VENV_NAME" || virtualenv $VENV_OPTIONS $VENV_NAME;
29
30 # If there are requirements, install them.
31 if [[ -f "./requirements.txt" ]]; then
32 vactivate
33 if [[ -f "$PROJ_NAME.pybundle" ]]; then
34 pip install "$PROJ_NAME.pybundle"
35 fi
36 pip install $(cat ./requirements.txt)
37 fi
38 fi
39
40 cd $oldir
41 } #buildenv()
42
Something went wrong with that request. Please try again.