-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathsetup.sh
More file actions
31 lines (25 loc) · 827 Bytes
/
setup.sh
File metadata and controls
31 lines (25 loc) · 827 Bytes
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
30
#!/bin/sh
# Bash script to set up virtualenv and run dev server.
cwd=$(pwd)
echo "Setting up..."
# Set up virtual environment.
if [ ! -d $cwd/env ]; then
echo "Creating virtualenv..."
virtualenv --no-site-packages env
else
echo "Virtualenv already exists."
echo "If you want to set up a new one, please remove the env directory."
fi
# Install all dependencies in the virtual environment.
source env/bin/activate && pip install -r $cwd/requirements.txt
# Set up database.
#if [ ! -f "$cwd/something.db" ]; then
# echo "Creating Database."
# source env/bin/activate && python createdbs.py
#else
# echo "Database already exists."
# echo "To recreate database, delete current one and rerun script."
#fi
echo "Setup is done!"
echo "Starting up..."
source env/bin/activate && python website/site.py