mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
[skip ci] Docker: allow skip MinecraftClient download if MCC_SKIP_REDOWNLOAD (#2591)
defined Really useful during development/testing docker. Simply pass MCC_SKIP_REDOWNLOAD
This commit is contained in:
parent
67662c5df7
commit
e1b018c333
1 changed files with 17 additions and 11 deletions
|
|
@ -2,6 +2,9 @@
|
||||||
|
|
||||||
cd /opt/data || exit 1
|
cd /opt/data || exit 1
|
||||||
|
|
||||||
|
if [ -e "./MinecraftClient" -a -n "$MCC_SKIP_REDOWNLOAD" ]; then
|
||||||
|
echo "Skip re-download MinecraftClient"
|
||||||
|
else
|
||||||
# Use the provided version tag or get the latest release tag
|
# 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)}
|
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)}
|
||||||
|
|
||||||
|
|
@ -9,6 +12,8 @@ RELEASE_TAG=${MCC_VERSION:-$(curl -s -v https://github.com/MCCTeam/Minecraft-Con
|
||||||
[ -e MinecraftClient-linux.zip ] && rm -- MinecraftClient-linux.zip
|
[ -e MinecraftClient-linux.zip ] && rm -- MinecraftClient-linux.zip
|
||||||
[ -e MinecraftClient ] && rm -- MinecraftClient
|
[ -e MinecraftClient ] && rm -- MinecraftClient
|
||||||
|
|
||||||
|
echo "Donwloading MinecraftClient for ${RELEASE_TAG}"
|
||||||
|
|
||||||
# Download the specified build or the latest one
|
# 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
|
curl -L https://github.com/MCCTeam/Minecraft-Console-Client/releases/download/${RELEASE_TAG}/MinecraftClient-linux.zip --output MinecraftClient-linux.zip
|
||||||
|
|
||||||
|
|
@ -17,6 +22,7 @@ unzip MinecraftClient-linux.zip
|
||||||
|
|
||||||
# Remove the ZIP
|
# Remove the ZIP
|
||||||
rm -- MinecraftClient-linux.zip
|
rm -- MinecraftClient-linux.zip
|
||||||
|
fi
|
||||||
|
|
||||||
# Set Executable
|
# Set Executable
|
||||||
chmod +x ./MinecraftClient
|
chmod +x ./MinecraftClient
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue