Skip to content

Instantly share code, notes, and snippets.

@realmayus
Last active August 7, 2020 13:04
Show Gist options
  • Save realmayus/b313066aba5e7acd34711b03b6fd762e to your computer and use it in GitHub Desktop.
Save realmayus/b313066aba5e7acd34711b03b6fd762e to your computer and use it in GitHub Desktop.
Whip up a VM for the chime discord bot
#!/bin/bash
cd /tmp/
curl -O https://download.java.net/java/GA/jdk13/5b8a42f3905b406298b72d750b6919f6/33/GPL/openjdk-13_linux-x64_bin.tar.gz
tar xvf openjdk-13_linux-x64_bin.tar.gz
sudo mv jdk-13 /opt/
sudo tee /etc/profile.d/jdk13.sh <<EOF
export JAVA_HOME=/opt/jdk-13
export PATH=\$PATH:\$JAVA_HOME/bin
EOF
source /etc/profile.d/jdk13.sh
echo $JAVA_HOME
java -version
echo "> Done with installing Java :)"
cd $HOME
echo "> Now installing PIP"
sudo apt install python3-pip
echo "> Done with installing PIP"
echo "> Now installing venv"
sudo python3 -m pip install virtualenv
echo "> Cloning repository & setting up virtualenv and directories"
git clone https://github.com/realmayus/chime.git
cd chime
mkdir secret
cd secret
touch firebase_creds.json
touch token.ini
cd ..
python3 -m virtualenv venv
source venv/bin/activate
python3 -m pip install -r requirements.txt
python3 -m pip install .
echo
echo "================================="
echo "Done with everything \o/"
echo "Please remember to insert your firebase credentials in secret/firebase_creds.json and your tokens in secret/token.ini"
echo "You can now start chime by running the command 'chime' in this venv."
echo "================================="
echo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment