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.
		
		
		
		
		
			
		
			
				
	
	
		
			50 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			Bash
		
	
			
		
		
	
	
			50 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			Bash
		
	
#!/bin/bash
 | 
						|
 | 
						|
##
 | 
						|
## Config
 | 
						|
##
 | 
						|
 | 
						|
set -e
 | 
						|
 | 
						|
DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")"
 | 
						|
STORAGE="$(dirname "$0")"
 | 
						|
 | 
						|
function error {
 | 
						|
  echo -e "\\e[91m$1\\e[39m"
 | 
						|
  exit 1
 | 
						|
}
 | 
						|
 | 
						|
##
 | 
						|
## Install mcpi-reborn
 | 
						|
##
 | 
						|
 | 
						|
if [[ "$(lsb_release -cs)" != "buster" && "$(lsb_release -cs)" != "bullseye" && "$(lsb_release -cs)" != "sid" ]]; then
 | 
						|
  error "Unsupported RPi OS Version! Your RPi OS version is $(lsb_release -cs), but supported versions are Buster, Bullseye, or Sid. Consider searching how to upgrade your version to RPi OS Buster!"
 | 
						|
fi
 | 
						|
 | 
						|
# Remove Old Minecraft Pi
 | 
						|
sudo apt-get remove -y minecraft-pi &>/dev/null || true
 | 
						|
sudo apt-get remove -y mcpil-r mcpil &>/dev/null || true
 | 
						|
 | 
						|
wget -qO- https://raw.githubusercontent.com/MCPI-Revival/mcpi-packages/master/install.sh | bash &>/dev/null || error "Failed to install apt repo!"
 | 
						|
 | 
						|
# Choose MCPIL to use
 | 
						|
PS3='Which launcher for MCPI Modded would you like to use? (Need help deciding? Ask here: https://discord.com/invite/aDqejQGMMy): '
 | 
						|
options=("gMCPIL (recommended)" "jMCPIL (better GUI)" "Quit")
 | 
						|
select opt in "${options[@]}"
 | 
						|
do
 | 
						|
  case $opt in
 | 
						|
    "${options[0]}")
 | 
						|
        "${DIRECTORY}/pkg-install" "minecraft-pi-reborn-client gmcpil" "$(dirname "$0")" || exit 1
 | 
						|
        break;;
 | 
						|
    "${options[1]}")
 | 
						|
        "${DIRECTORY}/pkg-install" "minecraft-pi-reborn-client jmcpil" "$(dirname "$0")" || exit 1
 | 
						|
        break;;
 | 
						|
    "${options[2]}")
 | 
						|
        break;;
 | 
						|
    *) echo "Invalid option: $REPLY";;
 | 
						|
  esac
 | 
						|
done
 | 
						|
 | 
						|
pip3 install mcpi
 |