Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # I'm still learning Bash and hope to make this script more interactive and simple
- # down the road without loosing simple functionality.
- # Copyright (C) 2015 Stefano Coronado, where applicable
- # This program is free software: you can redistribute it and/or modify
- # it under the terms of the GNU General Public License as published by
- # the Free Software Foundation, either version 3 of the License, or
- # (at your option) any later version.
- # This program is distributed in the hope that it will be useful,
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- # GNU General Public License for more details.
- # You should have received a copy of the GNU General Public License
- # along with this program. If not, see <http://www.gnu.org/licenses/>.
- # Asks for root password, or sudo before continuing for permission to write in /usr/games/.
- echo "Welcome to the Technic Pack Installer Script."
- echo "Please enter your password to continue."
- [ "$(whoami)" != "root" ] && exec sudo -- "$0" "$@"
- echo "Thank you!"
- ## Download & Installs Technic Launcher
- echo "Downloading Technic Launcher from Technicpack.net"
- wget http://launcher.technicpack.net/launcher4/256/TechnicLauncher.jar;
- mv ./TechnicLauncher.jar /usr/games
- chmod -x /usr/games/TechnicLauncher.jar;
- chmod 777 /usr/games/TechnicLauncher.jar;
- echo "Download of Launcher Complete!"
- ## Downloads & Installs Technic Launcher Icon
- echo "Downloading Icon."
- wget http://s17.postimg.org/mwex5l89b/technic_icon.png;
- mv ./technic_icon.png /usr/share/icons;
- ## Builds & Installs Technic Launcher Shortcut
- touch /usr/share/applications/technic_launcher.desktop;
- echo "[Desktop Entry]" >> /usr/share/applications/technic_launcher.desktop;
- echo "Version=1.0" >> /usr/share/applications/technic_launcher.desktop;
- echo "Name=Technic Launcher" >> /usr/share/applications/technic_launcher.desktop;
- echo "Comment=Technic Platform" >> /usr/share/applications/technic_launcher.desktop;
- echo "Exec=java -jar /usr/games/TechnicLauncher.jar" >> /usr/share/applications/technic_launcher.desktop;
- echo "Icon=/usr/share/icons/technic_icon.png" >> /usr/share/applications/technic_launcher.desktop;
- echo "Terminal=false" >> /usr/share/applications/technic_launcher.desktop;
- echo "Type=Application" >> /usr/share/applications/technic_launcher.desktop;
- echo "Categories=Application" >> /usr/share/applications/technic_launcher.desktop;
- chmod -x /usr/share/applications/technic_launcher.desktop;
- chmod 777 /usr/share/applications/technic_launcher.desktop;
- echo "Installation Complete!... exiting"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement