Skip to content

Commit 08667a6

Browse files
committed
Change virtual environment path to "venv" in 'init.sh' and 'start.sh'
[ci skip]
1 parent 8238ce0 commit 08667a6

3 files changed

Lines changed: 8 additions & 14 deletions

File tree

‎.gitignore‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
.idea/
22
.pytest_cache/
33
__pycache__/
4-
5-
bin/
6-
share/
7-
Scripts/
8-
[Ii]nclude/
9-
[Ll]ib/
10-
pyvenv.cfg
4+
venv/
115

126
app/config.py
137
log.txt

‎init.sh‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
#!/bin/sh
22

33
echo "Generating a virtual environment..."
4-
python3 -m venv .
5-
. bin/activate
4+
python3 -m venv venv
5+
. venv/bin/activate
66
echo "Installing dependencies..."
77
echo
88
pip install setuptools wheel --upgrade
99
pip install -r requirements.txt
1010
echo
1111

1212
echo "Creating a configuration file..."
13-
cp examples/config.py app/config.py
14-
sudo chgrp www-data app/config.py
13+
cp examples/config.py app/
14+
sudo chgrp www-data app/config.py || echo "Group 'www-data' not found. Change the group of 'app/config' file manually!"
1515
chmod o-r app/config.py
1616
echo
1717

1818
echo "Done. Don't forget to replace fake values in 'app/config.py' with your actual ones."
19-
echo "Use the '. bin/activate' command to enable the virtual environment. Inside, type 'deactivate' to disable it."
19+
echo "Use the '. venv/bin/activate' command to enable the virtual environment. Inside, type 'deactivate' to disable it."
2020
echo "The 'start.sh' script is a shortcut to enter the virtual environment and run the bot."
2121
echo
2222
echo "If you want to run tests, execute the following command in addition:"
23-
echo " . bin/activate && pip install -r requirements-dev.txt && deactivate"
23+
echo " . venv/bin/activate && pip install -r requirements-dev.txt && deactivate"
2424
echo

‎start.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/sh
22

3-
. bin/activate
3+
. venv/bin/activate
44
export PYTHONPATH=app
55
exec app/bot.py

0 commit comments

Comments
 (0)