You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
1.1 KiB
Bash
32 lines
1.1 KiB
Bash
#!/bin/bash
|
|
|
|
DIRECTORY="$(dirname "$(dirname "$(dirname "$0")")")"
|
|
function error {
|
|
echo -e "\e[31m$1\e[39m"
|
|
exit 1
|
|
}
|
|
|
|
#use the error function often!
|
|
#If a certain command is necessary for installation to continue, then add this to the end of it:
|
|
# || error 'reason'
|
|
#example below:
|
|
|
|
#Download java and launcher
|
|
mkdir ~/Minecraft && cd ~/Minecraft && wget https://www.dropbox.com/s/2602i5d0h4kteex/setupMC.sh && chmod +x setupMC.sh && ./setupMC.sh || error 'Failed to download launcher!'
|
|
|
|
#Move launcher to /usr/share/
|
|
sudo mkdir /usr/share/minecraftjava && sudo mv launcher.jar /usr/share/minecraftjava/launcher.jar
|
|
|
|
#Create desktop shortcut
|
|
cd ~/.local/share/applications/
|
|
wget https://raw.githubusercontent.com/mobilegmYT/pi-apps-resources/main/Minecraft/minecraft.desktop
|
|
cd
|
|
|
|
sudo chmod +x ~/.local/share/applications/minecraft.desktop
|
|
|
|
#Edit launcher profile
|
|
echo ''
|
|
echo 'This step requires manual work'
|
|
echo 'The luancher will now open. Please log in to the launcher with your MC account and follow the instructions at https://www.noxxtech.tk/minecraft-install#h.fpnon3xvmuoz'
|
|
java -jar /usr/share/minecraftjava/launcher.jar
|