mirror of
https://github.com/itzg/docker-minecraft-server
synced 2024-12-14 06:12:27 +00:00
31 lines
674 B
Text
31 lines
674 B
Text
|
#!/bin/bash
|
||
|
|
||
|
: "${NEOFORGE_VERSION:=latest}"
|
||
|
: "${NEOFORGE_FORCE_REINSTALL:=false}}"
|
||
|
|
||
|
# shellcheck source=start-utils
|
||
|
. "${SCRIPTS:-$(dirname "$0")}/start-utils"
|
||
|
isDebugging && set -x
|
||
|
|
||
|
resultsFile=/data/.run-neoforge.env
|
||
|
|
||
|
if ! mc-image-helper install-neoforge \
|
||
|
--output-directory=/data \
|
||
|
--results-file=${resultsFile} \
|
||
|
--minecraft-version="${VERSION}" \
|
||
|
--neoforge-version="${NEOFORGE_VERSION}" \
|
||
|
--force-reinstall="${NEOFORGE_FORCE_REINSTALL}"; then
|
||
|
log "ERROR failed to install Forge"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
# grab SERVER and export it
|
||
|
set -a
|
||
|
# shellcheck disable=SC1090
|
||
|
source ${resultsFile}
|
||
|
set +a
|
||
|
|
||
|
export FAMILY=FORGE
|
||
|
|
||
|
exec "${SCRIPTS:-/}start-setupWorld" "$@"
|