-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinit.sh
executable file
·24 lines (21 loc) · 935 Bytes
/
init.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
#!/bin/sh
echo "Generating a virtual environment..."
python3 -m venv venv
. venv/bin/activate
echo "Installing dependencies..."
echo
pip install setuptools wheel --upgrade
pip install -r requirements.txt
echo
echo "Creating a configuration file..."
cp examples/config.py app/data/
sudo chgrp www-data app/data/config.py || echo "Group 'www-data' not found. Change the group of the 'app/data/config.py' file manually!"
chmod o-r app/data/config.py
echo
echo "Done. Don't forget to replace fake values in 'app/data/config.py' with your actual ones."
echo "Use the '. venv/bin/activate' command to enable the virtual environment. Inside, type 'deactivate' to disable it."
echo "The 'start.sh' script is a shortcut to enter the virtual environment and run the bot."
echo
echo "If you want to run tests, execute the following command in addition:"
echo " . venv/bin/activate && pip install -r requirements-dev.txt && deactivate"
echo