Advertisement
Guest User

Technic_installer

a guest
Jan 30th, 2015
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.63 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # I'm still learning Bash and hope to make this script more interactive and simple
  4. # down the road without loosing simple functionality.
  5.  
  6. # Copyright (C) 2015 Stefano Coronado, where applicable
  7.  
  8. # This program is free software: you can redistribute it and/or modify
  9. # it under the terms of the GNU General Public License as published by
  10. # the Free Software Foundation, either version 3 of the License, or
  11. # (at your option) any later version.
  12.  
  13. # This program is distributed in the hope that it will be useful,
  14. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16. # GNU General Public License for more details.
  17.  
  18. # You should have received a copy of the GNU General Public License
  19. # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  20.  
  21. # Asks for root password, or sudo before continuing for permission to write in /usr/games/.        
  22. echo "Welcome to the Technic Pack Installer Script."
  23. echo  "Please enter your password to continue."
  24. [ "$(whoami)" != "root" ] && exec sudo -- "$0" "$@"
  25. echo "Thank you!"
  26.  
  27. ## Download & Installs Technic Launcher
  28. echo "Downloading Technic Launcher from Technicpack.net"
  29. wget http://launcher.technicpack.net/launcher4/256/TechnicLauncher.jar;
  30. mv ./TechnicLauncher.jar /usr/games
  31. chmod -x /usr/games/TechnicLauncher.jar;
  32. chmod 777 /usr/games/TechnicLauncher.jar;
  33. echo "Download of Launcher Complete!"
  34.  
  35. ## Downloads & Installs Technic Launcher Icon
  36. echo "Downloading Icon."  
  37. wget http://s17.postimg.org/mwex5l89b/technic_icon.png;
  38. mv ./technic_icon.png /usr/share/icons;
  39.  
  40.  
  41. ## Builds & Installs Technic Launcher Shortcut
  42. touch /usr/share/applications/technic_launcher.desktop;
  43. echo "[Desktop Entry]" >> /usr/share/applications/technic_launcher.desktop;
  44. echo "Version=1.0" >> /usr/share/applications/technic_launcher.desktop;
  45. echo "Name=Technic Launcher" >> /usr/share/applications/technic_launcher.desktop;
  46. echo "Comment=Technic Platform" >> /usr/share/applications/technic_launcher.desktop;
  47. echo "Exec=java -jar /usr/games/TechnicLauncher.jar" >> /usr/share/applications/technic_launcher.desktop;
  48. echo "Icon=/usr/share/icons/technic_icon.png" >> /usr/share/applications/technic_launcher.desktop;
  49. echo "Terminal=false" >> /usr/share/applications/technic_launcher.desktop;
  50. echo "Type=Application" >> /usr/share/applications/technic_launcher.desktop;
  51. echo "Categories=Application" >> /usr/share/applications/technic_launcher.desktop;
  52. chmod -x /usr/share/applications/technic_launcher.desktop;
  53. chmod 777 /usr/share/applications/technic_launcher.desktop;
  54.  
  55. echo "Installation Complete!... exiting"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement