forked from nigel-gott/RBM-Website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·38 lines (30 loc) · 1 KB
/
install.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
30
31
32
33
34
35
36
37
38
#!/bin/bash
# Installs everything required by the project
# Sets up the environment for developing
echo "Creating virtual env folder in venv..."
virtualenv venv
echo "Activating the virtual env..."
source venv/bin/activate
# Installs any required packages
echo "Installing all requirements..."
pip install -r requirements.txt
# Adds the git hooks
echo "Linking post commit and merge hooks..."
cd .git/hooks
ln -s ../../hooks/pre-commit pre-commit
ln -s ../../hooks/post-merge post-merge
cd ../../
# Clones the latest release of the RBM library
echo "Cloning rbm lib..."
git clone https://github.com/fleurette/RBM.git rbm_website/libs/rbm_lib
# Creates the database
echo "Setting up database..."
rm database.sqlite3
python manage.py syncdb --noinput
# Cleans up the media folder and removes all data
echo "Cleaning media folder..."
cd rbm_website/media
mv info.txt ../
rm -rf *
mv ../info.txt .
echo "Finished, activate the virtual env with ./activate or 'source venv/bin/activate' or 'source venv/bin/activate.csh'"