From 8bdb20a22c7abf6c409141753d8d5d0d9998ed00 Mon Sep 17 00:00:00 2001 From: breadbyte <14045257+breadbyte@users.noreply.github.com> Date: Wed, 14 Aug 2024 18:22:05 +0800 Subject: [PATCH] [skip ci] Update docker image to use updated releases --- Docker/start-latest.sh | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/Docker/start-latest.sh b/Docker/start-latest.sh index d94d8f00..01cc5847 100644 --- a/Docker/start-latest.sh +++ b/Docker/start-latest.sh @@ -10,20 +10,16 @@ else # 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)} + # Taken from https://stackoverflow.com/a/70369688 + ARCH=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/x64/) + # Delete the old build - [ -e MinecraftClient-linux.zip ] && rm -- MinecraftClient-linux.zip [ -e MinecraftClient ] && rm -- MinecraftClient - echo "Donwloading MinecraftClient for ${RELEASE_TAG}" + echo "Donwloading MinecraftClient for ${RELEASE_TAG}-${ARCH}" # Download the specified build or the latest one - curl -L https://github.com/MCCTeam/Minecraft-Console-Client/releases/download/${RELEASE_TAG}/MinecraftClient-${MCC_PLATFORM:=linux}.zip --output MinecraftClient-linux.zip - - # Unzip it - unzip MinecraftClient-linux.zip - - # Remove the ZIP - rm -- MinecraftClient-linux.zip + curl -L https://github.com/MCCTeam/Minecraft-Console-Client/releases/download/${RELEASE_TAG}/MinecraftClient-${RELEASE_TAG}-${MCC_PLATFORM:=linux}-${ARCH} --output MinecraftClient fi # Set Executable