Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- clear
- echo -e "\e[0;44m"
- echo -e "\e[0;37m Petal Installer v0.1 by John. \e[0m"
- read -rsp $'Press any key to begin...\n' -n1 key
- echo -e "\e[4;31m This installer assumes you have no idea what you are doing, it will make modifications to your software source list as well as your python dependencies. These changes shouldnt under almost all circumstances cause any problems. \n\n For manual installation, go to http://github.com/hdmifish and choose the appropriate repo.\e[0m"
- echo -e '\e[0;33m If you would like to quit now, please press CTRL+C. otherwise press enter'
- read name
- clear
- echo "\e[0;32m Root check... \3[0m"
- if [ "$(id -u)" != "0" ]; then
- echo "\e[0;40m This installer requires root privilages to run, do sudo ./setup.sh to fix this\e[0m"
- exit 1
- fi
- clear
- echo -e "\e[0m"
- echo -e "\e[1;32m Installing Python3.5.x... \e[0m"
- apt-get update
- apt-get install libffi-dev -y
- apt-get install build-essential -y
- apt-get install python3.5 python3.5-dev -y
- if [[ $(uname -m | grep 'armv') ]]; then
- clear
- echo -e "\e[0;44m"
- echo -e "\e[1;37m Python3.5 is a bitch to install on a raspberry pi, I can do it for you but it will take about 30-40 minutes and can bork your pi.(unlikely). "
- echo -e "If you are ok with this, please press enter. Otherwise, press CTRL+C and follow the instructions on the website below"
- echo -e "http://bohdan-danishevsky.blogspot.com/2015/10/building-python-35-on-raspberry-pi-2.html \e[0m"
- read name
- cd /usr/local/bin
- if [ -f python3.5 ];
- then
- echo -e "\e[0;32m Python3.5 is already on this machine. Woot! \e[0m" ;
- else
- clear
- echo "Python3.5 will now be installed. This takes a really long time, it's reccomended you take a shower or watch an episode of South Park during the time. If this isnt cool with you, do CTRL+C now"
- read name
- apt-get install libncursesw5-dev libgdbm-dev libc6-dev
- apt-get install zlib1g-dev libsqlite3-dev tk-dev
- apt-get install libssl-dev openssl
- wget -O py35.tgz https://www.python.org/ftp/python/3.5.0/Python-3.5.0.tgz
- tar -zxvf py35.tgz
- cd py35
- ./configure
- make -j4
- make install
- echo "\e[0;32m Python3.5 has successfully been installed on this machine \e[0m" ;
- fi
- fi
- echo "Installing pip3.5..."
- wget https://bootstrap.pypa.io/get-pip.py
- python3.5 get-pip.py
- echo "Updating pip3.5 to newest version..."
- pip3.5 install --upgrade pip
- echo "Installing required libraries..."
- pip3.5 install --upgrade websockets aiohttp colorama requests cleverbot pynacl ruamel.yaml discord.py
- echo "Downloading Petal..."
- wget -O petal.py http://pastebin.com/raw/nurUWLxC
- echo "Running petal for the first time..."
- python3.5 petal.py
- echo "Done..."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement