-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbootstrap.sh
executable file
·29 lines (26 loc) · 1.11 KB
/
bootstrap.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh
# XXX: Change the following to suit
VIRTUALENV_EXECUTABLE='/usr/bin/virtualenv';
echo "Using VIRTUALENV_EXECUTABLE=${VIRTUALENV_EXECUTABLE}"
if test -f ${VIRTUALENV_EXECUTABLE}; then
if ! test -x ./env; then
${VIRTUALENV_EXECUTABLE} --distribute --no-site-packages env
fi
if test -f ./env/bin/python && test -f ./env/bin/pip; then
env/bin/pip install -r requirements.txt
if [ ! -f data.db ]; then
env/bin/python runflaskapp.py install
chmod g+w data.db
echo "In order to access and manage the web interface, a system user must be created."
echo "If this is the first time configuring, please use the createuser.py script to create an account."
else
echo "It appears that system has already been bootstrapped."
fi
fi
else
echo "You must install python-virtualenv in order to build this project."
echo "Check to see that it isn't already installed under a non-standard name, e.g., virtualenv-2.6."
echo "If so, modify 'VIRTUALENV_EXECUTABLE' at the top of the bootstrap script"
echo
echo "Please see http://pypi.python.org/pypi/virtualenv for more details"
fi