2020-04-21 23:30:48 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2022-01-29 20:53:34 +00:00
|
|
|
# shellcheck source=start-utils
|
|
|
|
. "${SCRIPTS:-/}start-utils"
|
2021-07-27 00:32:26 +00:00
|
|
|
isDebugging && set -x
|
|
|
|
|
2022-01-29 20:53:34 +00:00
|
|
|
: "${VANILLA_VERSION?}"
|
2021-07-31 14:24:38 +00:00
|
|
|
|
2022-07-21 02:14:38 +00:00
|
|
|
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?"
|
2020-04-21 23:30:48 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2022-07-21 02:14:38 +00:00
|
|
|
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
|
2021-07-31 14:24:38 +00:00
|
|
|
fi
|
2020-04-21 23:30:48 +00:00
|
|
|
|
2022-07-21 02:14:38 +00:00
|
|
|
export SERVER
|
2021-12-11 02:50:40 +00:00
|
|
|
export FAMILY=HYBRID
|
2022-01-29 20:53:34 +00:00
|
|
|
|
|
|
|
exec "${SCRIPTS:-/}start-setupWorld" "$@"
|