Advertisement
Guest User

setupsh

a guest
Oct 25th, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.66 KB | None | 0 0
  1. #!/bin/bash
  2. clear
  3. echo -e "\e[0;44m"
  4. echo -e "\e[0;37m Petal Installer v0.1 by John. \e[0m"
  5. read -rsp $'Press any key to begin...\n' -n1 key
  6.  
  7. 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"
  8. echo -e '\e[0;33m If you would like to quit now, please press CTRL+C. otherwise press enter'
  9. read name
  10. clear
  11. echo "\e[0;32m Root check... \3[0m"
  12. if [ "$(id -u)" != "0" ]; then
  13.     echo "\e[0;40m This installer requires root privilages to run, do sudo ./setup.sh to fix this\e[0m"
  14.     exit 1
  15. fi
  16. clear
  17. echo -e "\e[0m"
  18. echo -e "\e[1;32m Installing Python3.5.x... \e[0m"
  19. apt-get update
  20. apt-get install libffi-dev -y
  21. apt-get install build-essential -y
  22. apt-get install python3.5 python3.5-dev -y
  23. if [[ $(uname -m | grep 'armv') ]]; then
  24.     clear
  25.     echo -e "\e[0;44m"
  26.         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). "
  27.         echo -e "If you are ok with this, please press enter. Otherwise, press CTRL+C and follow the instructions on the website below"
  28.     echo -e "http://bohdan-danishevsky.blogspot.com/2015/10/building-python-35-on-raspberry-pi-2.html \e[0m"
  29.     read name
  30.     cd /usr/local/bin
  31.     if [ -f  python3.5 ];
  32.  
  33.     then
  34.         echo -e "\e[0;32m Python3.5 is already on this machine. Woot! \e[0m" ;
  35.  
  36.     else
  37.         clear
  38.         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"
  39.         read name
  40.         apt-get install libncursesw5-dev libgdbm-dev libc6-dev
  41.         apt-get install zlib1g-dev libsqlite3-dev tk-dev
  42.         apt-get install libssl-dev openssl
  43.         wget -O py35.tgz https://www.python.org/ftp/python/3.5.0/Python-3.5.0.tgz
  44.         tar -zxvf py35.tgz
  45.         cd py35
  46.         ./configure
  47.         make -j4
  48.         make install
  49.         echo "\e[0;32m Python3.5 has successfully been installed on this machine \e[0m" ;
  50.     fi
  51. fi
  52.  
  53. echo "Installing pip3.5..."
  54. wget https://bootstrap.pypa.io/get-pip.py
  55. python3.5 get-pip.py
  56. echo "Updating pip3.5 to newest version..."
  57. pip3.5 install --upgrade pip
  58. echo "Installing required libraries..."
  59. pip3.5 install --upgrade websockets aiohttp colorama requests cleverbot pynacl ruamel.yaml discord.py
  60. echo "Downloading Petal..."
  61. wget -O petal.py http://pastebin.com/raw/nurUWLxC
  62. echo "Running petal for the first time..."
  63. python3.5 petal.py
  64. echo "Done..."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement