Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # This file is just so that people can quickly get minecraft set up on an ubuntu machine
- # I was playing about
- # Not 100% sure if it works on other machines.
- # MUST BE RAN BY ROOT OR SUDO (sudo bash file_name.sh)
- printf "Installing Minecraft\nPlease input your username that will be used for creating file structures. (If you don't know it then it is the name of the folder in /home"
- read name
- mkdir ~/.minecraft
- echo "Created ~/.minecraft"
- cd ~/.minecraft
- wget "https://s3.amazonaws.com/Minecraft.Download/launcher/Minecraft.jar"
- echo "Downloaded launcher from the official website"
- echo "cd ~/.minecraft; java -jar Minecraft.jar" >> exec.sh
- echo "Created execution script"
- sudo chmod +x exec.sh Minecraft.jar
- echo "Execution script executeable"
- wget "http://fc06.deviantart.net/fs70/f/2010/325/1/8/minecraft_icon_by_dharmainitiative2010-d33ca5p.png" -O "icon.png"
- echo "Downloading icon"
- sudo printf "[Desktop Entry]\nName=Minecraft\nComment=Play Minecraft\nKeywords=game;mine;minecraft;craft;\nExec=/home/$name/.minecraft/exec.sh\nTerminal=false\nType=Application\nStartupNotify=true\nIcon=/home/$name/.minecraft/icon.png\nCategories=Game;" >> ~/Desktop/minecraft.desktop
- echo "Created launcher"
- sudo mv ~/Desktop/minecraft.desktop /usr/share/applications/minecraft.desktop
- sudo chmod +x /usr/share/applications/minecraft.desktop
- sudo chown root /usr/share/applications/minecraft.desktop
- sudo chgrp root /usr/share/applications/minecraft.desktop
- echo "Fixed permissions, search in the unity a few times for it to show."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement