Minecraft-Console-Client/Docker/start-latest.sh
merlinlcb 86eeb76a9e
Update start-latest.sh
found that randomly after updating to the latest version execution was not being permitted on multiple linux devices running docker, this solves for that
2022-12-23 12:51:11 -07:00

25 lines
782 B
Bash

#!/bin/sh
cd /opt/data || exit 1
# Use the provided version tag or get the latest release tag
RELEASE_TAG=${MCC_VERSION:-$(curl -s -v https://github.com/MCCTeam/Minecraft-Console-Client/releases/latest 2>&1 | grep -i location: | tr -d '\r' | cut -d/ -f8)}
# Delete the old build
[ -e MinecraftClient-linux.zip ] && rm -- MinecraftClient-linux.zip
[ -e MinecraftClient ] && rm -- MinecraftClient
# Download the specified build or the latest one
curl -L https://github.com/MCCTeam/Minecraft-Console-Client/releases/download/${RELEASE_TAG}/MinecraftClient-linux.zip --output MinecraftClient-linux.zip
# Unzip it
unzip MinecraftClient-linux.zip
# Remove the ZIP
rm -- MinecraftClient-linux.zip
# Set Executable
chmod +x /opt/start-latest.sh
# Start the Client
./MinecraftClient