mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2024-06-07 19:40:43 +00:00
23 lines
608 B
Bash
Executable File
23 lines
608 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# shellcheck source=start-utils
|
|
. "${SCRIPTS:-/}start-utils"
|
|
isDebugging && set -x
|
|
|
|
: "${VANILLA_VERSION?}"
|
|
|
|
if ! downloadUrl=$(get --json-path '$.link' "https://api.magmafoundation.org/api/v2/${VANILLA_VERSION}/latest"); then
|
|
log "ERROR failed to locate latest Magma download for ${VANILLA_VERSION}. Is that version supported?"
|
|
exit 1
|
|
fi
|
|
|
|
if ! SERVER=$(get --output-filename --skip-up-to-date --output /data "$downloadUrl"); then
|
|
log "ERROR: failed to download Magma server jar from $downloadUrl"
|
|
exit 1
|
|
fi
|
|
|
|
export SERVER
|
|
export FAMILY=HYBRID
|
|
|
|
exec "${SCRIPTS:-/}start-setupWorld" "$@"
|