mirror of
https://github.com/itzg/docker-minecraft-server
synced 2024-12-16 23:23:06 +00:00
26 lines
773 B
Bash
26 lines
773 B
Bash
#!/bin/bash
|
|
|
|
. ${SCRIPTS:-/}start-utils
|
|
|
|
if [ "${VERSION}" != "LATEST" ]; then
|
|
log "ERROR: Tuinity server type only supports VERSION=LATEST"
|
|
exit 1
|
|
fi
|
|
|
|
: ${TUINITY_BUILD:=lastSuccessfulBuild}
|
|
export SERVER=tuinity-${VANILLA_VERSION}-${TUINITY_BUILD}.jar
|
|
|
|
if [ ! -f "$SERVER" ] || [ -n "$FORCE_REDOWNLOAD" ]; then
|
|
downloadUrl="https://ci.codemc.io/job/Spottedleaf/job/Tuinity/${TUINITY_BUILD}/artifact/tuinity-paperclip.jar"
|
|
log "Downloading Tuinity (build $TUINITY_BUILD) from $downloadUrl ..."
|
|
curl -fsSL -o "$SERVER" "$downloadUrl"
|
|
if [ ! -f "$SERVER" ]; then
|
|
log "ERROR: failed to download from $downloadUrl (status=$?)"
|
|
exit 3
|
|
fi
|
|
fi
|
|
|
|
# Normalize on Spigot for later operations
|
|
export TYPE=SPIGOT
|
|
|
|
exec ${SCRIPTS:-/}start-spiget "$@"
|