Minecraft-Console-Client/Docker/start-latest.sh

23 lines
737 B
Bash
Raw Normal View History

#!/bin/sh
cd /opt/data || exit 1
2022-08-19 21:22:54 +02:00
# 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)}
2022-08-19 21:22:54 +02:00
# Delete the old build
[ -e MinecraftClient-linux.zip ] && rm -- MinecraftClient-linux.zip
[ -e MinecraftClient ] && rm -- MinecraftClient
2022-08-19 21:22:54 +02:00
# 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
# Start the Client
./MinecraftClient