Skip to content

Instantly share code, notes, and snippets.

@linuxdaemon
Last active December 31, 2019 02:27
Show Gist options
  • Save linuxdaemon/0914d0491e9d7f39532cb394efc1e6e7 to your computer and use it in GitHub Desktop.
Save linuxdaemon/0914d0491e9d7f39532cb394efc1e6e7 to your computer and use it in GitHub Desktop.
#!/bin/bash
sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
xz-utils tk-dev libffi-dev liblzma-dev python-openssl git
curl https://pyenv.run | bash
echo 'export PATH="$HOME/.pyenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(pyenv init -)"' >> ~/.bashrc
echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bashrc
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
pyenv rehash
pyenv update
pyenv install 3.6.10
git clone https://github.com/TotallyNotRobots/CloudBot.git gonzobot
cd gonzobot
pyenv local 3.6.10
python3 -m venv venv
venv/bin/pip install -U pip setuptools
venv/bin/pip install -Ur requirements.txt
if [[ -f config.json ]]; then
echo "Config already exists"
else
cp config.default.json config.json
echo "Now edit config.json as needed"
fi
echo 'Start the bot with `venv/bin/python -m cloudbot` in the gonzobot directory'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment