Advertisement
Amolith

Linux Installer Script

Dec 26th, 2017
1,566
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 8.23 KB | None | 0 0
  1. #!/bin/bash
  2. read -rp "Do you want to create commands to individually update, upgrade, autoremove packages, a command to do all of that at once, and commands to shutdown and reboot your system, do you want to install Amolith's favourite applications, or do you want to install Mycroft? (c/a/m)" q
  3. if [ "$q" = "c" ]; then
  4.   cd
  5.   #Create simple commands
  6.   zenity --password > auth.txt
  7.   echo "cat auth.txt | sudo -S apt-get update" > ud
  8.   echo "cat auth.txt | sudo -S apt-get -y dist-upgrade" > ug
  9.   echo "cat auth.txt | sudo -S apt -y autoremove" > remove
  10.   echo "ud && ug && remove" > maintain
  11.   echo "cat auth.txt | sudo -S shutdown now" > po
  12.   echo "cat auth.txt | sudo -S shutdown -r now" > rb
  13.  
  14.   #Make the commands above executable and actual commands
  15.   chmod +x ud
  16.   chmod +x ug
  17.   chmod +x remove
  18.   chmod +x maintain
  19.   chmod +x po
  20.   chmod +x rb
  21.   sudo cp ud /bin/ud
  22.   sudo cp ug /bin/ug
  23.   sudo cp remove /bin/remove
  24.   sudo cp maintain /bin/maintain
  25.   sudo cp po /bin/po
  26.   sudo cp rb /bin/rb
  27.   rm ud ug remove maintain rb po
  28. if [ "$q" = "a" ]; then
  29.  
  30.   #System maintenance
  31.   maintain
  32.  
  33.   #Preload daemon
  34.   sudo apt-get install -y preload
  35.  
  36.   #Wallpaper downloader/changer
  37.   sudo apt-get install -y variety
  38.  
  39.   #British spell-checker
  40.   sudo apt-get install -y hunspell-en-gb
  41.  
  42.   #Indicator Bulletin (clipboard manager)
  43.   sudo add-apt-repository -y ppa:1047481448-2/sergkolo
  44.   sudo apt-get update
  45.   sudo apt-get install indicator-bulletin
  46.  
  47.   #Required for Windscribe
  48.   sudo apt-get install -y apt-transport-https
  49.  
  50.   #Debian package installer
  51.   sudo apt-get install -y gdebi
  52.  
  53.   #Gedit text editor
  54.   sudo apt-get install -y gedit
  55.  
  56.   #Graphical partition editor
  57.   sudo apt-get install -y gparted
  58.  
  59.   #LibreOffice
  60.   sudo apt-get install -y libreoffice
  61.  
  62.   #LibreOffice theme
  63.   sudo apt-get install -y libreoffice-style-breeze
  64.  
  65.   #Firefox
  66.   sudo apt-get install -y firefox firefox-locale-en
  67.  
  68.   #Rhythmbox
  69.   sudo apt-get install -y rhythmbox
  70.  
  71.   #Remove Pidgin
  72.   sudo apt-get purge -y pidgin
  73.  
  74.   #Remove Chromium
  75.   sudo apt-get purge -y chromium-browser
  76.  
  77.   #Remove Orage
  78.   sudo apt-get purge -y orage
  79.  
  80.   #Remove deadbeef
  81.   sudo apt-get purge -y deadbeef
  82.  
  83.   #Remove mousepad text editor
  84.   sudo apt-get purge -y mousepad
  85.  
  86.   #Nautilus File Manager
  87.   sudo apt-get install -y nautilus
  88.  
  89.   #KDE Connect
  90.   sudo add-apt-repository -y ppa:webupd8team/indicator-kdeconnect
  91.   sudo apt-get update
  92.   sudo apt install -y indicator-kdeconnect
  93.  
  94.   #FluxGUI
  95.   sudo add-apt-repository -y ppa:nathan-renniewaldock/flux
  96.   sudo apt-get update
  97.   sudo apt-get install -y fluxgui
  98.  
  99.   #Albert (distro-agnostic launcher)
  100.   sudo add-apt-repository -y ppa:nilarimogard/webupd8
  101.   sudo apt-get update
  102.   sudo apt-get install -y albert
  103.  
  104.   #Signal Private Messenger
  105.   curl -s https://updates.signal.org/desktop/apt/keys.asc | sudo apt-key add -
  106.   echo "deb [arch=amd64] https://updates.signal.org/desktop/apt xenial main" | sudo tee -a /etc/apt/sources.list.d/signal-xenial.list
  107.   sudo apt-get update
  108.   sudo apt-get install -y signal-desktop
  109.  
  110.   #Creates a directory for .deb files to download into
  111.   cd
  112.   cd Downloads
  113.   mkdir Programs
  114.   cd Programs
  115.  
  116.   #Download Etcher image writer
  117.   wget -O etcher https://github.com/resin-io/etcher/releases/download/v1.1.2/etcher-1.1.2-linux-x86_64.zip
  118.   unzip etcher -d /Programs
  119.   rm etcher-1.1.2-linux-x86_64.zip
  120.   zenity --info --text="Now, Etcher is in the Programs folder and you can open that directory in Nautilus, double-click on it, and it gives you the option to install a desktop launcher."
  121.  
  122.   #Franz Messenger Hub
  123.   wget -O franz.deb https://github.com/meetfranz/franz/releases/download/v5.0.0-beta.14/franz_5.0.0-beta.14_amd64.deb
  124.   sudo dpkg -i franz.deb
  125.   sudo apt-get install -f -y
  126.  
  127.   #Atom text editor
  128.   wget -O atom.deb https://atom.io/download/deb
  129.   sudo dpkg -i atom.deb
  130.   sudo apt-get install -f -y
  131.  
  132.   #Dropbox
  133.   wget -O dropbox.deb https://www.dropbox.com/download?dl=packages/ubuntu/dropbox_2015.10.28_amd64.deb
  134.   sudo dpkg -i dropbox.deb
  135.   sudo apt-get install -f -y
  136.  
  137.   #Unified Remote Server
  138.   wget -O urserver.deb https://www.unifiedremote.com/download/linux-x64-deb
  139.   sudo dpkg -i urserver.deb
  140.   sudo apt-get install -f -y  
  141.  
  142.   #Mailspring email client
  143.   wget -O mailspring.deb https://updates.getmailspring.com/download?platform=linuxDeb
  144.   sudo dpkg -i mailspring.deb
  145.   sudo apt-get install -f -y
  146.  
  147.   #Teamviewer
  148.   wget -O teamviewer.deb https://download.teamviewer.com/download/teamviewer_i386.deb
  149.   sudo dpkg -i teamviewer.deb
  150.   sudo apt-get install -f -y
  151.  
  152.   #Joplin (Evernote alternative)
  153.   wget -O joplin.AppImage https://github.com/laurent22/joplin/releases/download/v0.10.25/Joplin-0.10.25-x86_64.AppImage
  154.   sudo chmod +x joplin.AppImage
  155.   ./joplin.AppImage
  156.  
  157.   #MultiBootUSB
  158.   wget -O mbusb.deb https://github.com/mbusb/multibootusb/releases/download/8.9.0/python3-multibootusb_8.9.0-1_all.deb
  159.   sudo dpkg -i mbusb.deb
  160.   sudo apt-get install -f -y
  161.  
  162.   #Slack
  163.   wget -O slack.deb https://downloads.slack-edge.com/linux_releases/slack-desktop-3.0.2-amd64.deb
  164.   sudo dpkg -i slack.deb
  165.   sudo apt-get install -f -y
  166.  
  167.   #Download cursor theme Bridge and unpack straight into the icons directory so it shows up in Settings
  168.   cd
  169.   wget -O /tmp/bridge.tar.gz https://dl.opendesktop.org/api/files/download/id/1464728434/164587-bridge.tar.gz
  170.   sudo tar -xvzf /tmp/bridge.tar.gz -C /usr/share/icons
  171.  
  172.   #Download icon theme Papirus and unpack straight into the themes directory so it shows up in Settings
  173.   wget -O /tmp/papirus.zip https://github.com/PapirusDevelopmentTeam/papirus-icon-theme/archive/master.zip
  174.   sudo unzip /tmp/papirus.zip -C /usr/share/themes
  175.  
  176.   #Install Numix GTK theme
  177.   sudo apt install numix-gtk-theme
  178.   zenity --info --text="Make sure you select Bridge as the cursor, Papirus as the icon theme AND the window border theme, and Numix as the GTK+ theme when you go into Customise Look and Feel"
  179.  
  180.   #Use the cursor theme, Bridge, system-wide
  181.   cd
  182.   zenity --info --text="Replace whatever is here with Bridge"
  183.   sudo gedit /usr/share/icons/default/index.theme
  184.  
  185.   #Install Windscribe VPN
  186.   sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key FDC247B7
  187.   echo 'deb https://repo.windscribe.com/ubuntu zesty main' | sudo tee /etc/apt/sources.list.d/windscribe-repo.list
  188.   sudo apt-get update
  189.   sudo apt-get install -y windscribe-cli
  190.   xfce4-terminal -e "windscribe login && windscribe start"
  191.  
  192.   #Just to be sure we don't have any missing dependencies
  193.   sudo apt-get install -f -y
  194.   maintain
  195.  
  196.   #Finished
  197.   zenity --info --text="Connect to Windscribe with windscribe connect best"
  198.   zenity --info --text="Activate clipboard manager with indicator-bulletin"
  199.   zenity --info --text="Scroll through the output and look for any errors so they can be fixed"
  200.   cd
  201.  
  202. if [ "$q" = "m" ]; then
  203.   read -rp "Mycroft will take a long time to install. Do you want to continue? (y/n) " q2
  204.   if [ "$q2" = "y" ]; then
  205.     cd ~/
  206.     git clone https://github.com/MycroftAI/mycroft-core.git
  207.     cd mycroft-core
  208.     bash dev_setup.sh
  209.  
  210.     #Make commands for starting Mycroft in different modes
  211.     cd
  212.     echo "cd ~/mycroft-core && ./start-mycroft.sh debug" > mycroft_cli
  213.     echo "cd ~/mycroft-core && ./start-mycroft.sh all" > mycroft
  214.     echo "cd ~/mycroft-core && ./start-mycroft.sh cli" > mc_cli
  215.     echo "cd ~/mycroft-core && ./stop-mycroft.sh" > stop_mycroft
  216.  
  217.     #Make commands executable
  218.     sudo chmod +x mycroft_cli mycroft mc_cli stop_mycroft
  219.     sudo cp mycroft_cli /bin/mycroft_cli
  220.     sudo cp mycroft /bin/mycroft
  221.     sudo cp mc_cli /bin/mc_cli
  222.     sudo cp stop_mycroft /bin/stop_mycroft
  223.     rm mycroft_cli mycroft mc_cli stop_mycroft
  224.  
  225.     zenity --info --text="Start Mycroft with command line interface with mycroft_cli"
  226.     zenity --info --text="Start Mycroft withOUT command line interface with mycroft"
  227.     zenity --info --text="Bring up the command line AFTER you've started Mycroft with mc_cli"
  228.     zenity --info --text="Stop Mycroft with stop_mycroft"
  229.   if [ "$q2" = "n" ]; then
  230.     sed -n '203, 229p' gallium_installer.sh > install_mycroft.sh
  231.     sudo chmod +x mycroft_installer.sh
  232.     zenity --info --text="You can install Mycroft later with ./install_mycroft.sh"
  233. fi
  234. fi
  235. fi
  236. fi
  237. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement