forked from snoonetIRC/CloudBot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvagrant-bootstrap.sh
More file actions
28 lines (22 loc) · 782 Bytes
/
vagrant-bootstrap.sh
File metadata and controls
28 lines (22 loc) · 782 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
#!/usr/bin/env bash
# update sources
sudo apt-get update
# install things:
# python3.4-dev so we can install things with pip
# libenchant1c2a pyenchant dependency
# libxml2-dev python-lxml dependency
# libxslt-dev python-lxml dependency
# zlib1g-dev python-lxml dependency
sudo apt-get install -y python3-pip git libenchant1c2a libxml2-dev libxslt-dev zlib1g-dev
curl -Ls https://bootstrap.pypa.io/get-pip.py | python3.4
# install requirements using pip
sudo pip3 install -r /vagrant/requirements.txt
# create link from project to ~/bot
ln -sf /vagrant /home/vagrant/bot
# create start.sh script
cat > /usr/local/bin/start-bot <<- _EOF_
#!/usr/bin/env bash
cd /home/vagrant/bot
python3 -m cloudbot
_EOF_
chmod +x /usr/local/bin/start-bot