mirror of
https://github.com/itzg/docker-minecraft-server
synced 2024-12-12 13:22:28 +00:00
35 lines
904 B
Bash
Executable file
35 lines
904 B
Bash
Executable file
#!/bin/bash
|
|
|
|
: "${FORGE_VERSION:=${FORGEVERSION:-RECOMMENDED}}"
|
|
: "${FORGE_FORCE_REINSTALL:=false}}"
|
|
|
|
# shellcheck source=start-utils
|
|
. "${SCRIPTS:-$(dirname "$0")}/start-utils"
|
|
isDebugging && set -x
|
|
resultsFile=/data/.run-forge.env
|
|
|
|
function mc-image-helper-forge() {
|
|
mc-image-helper install-forge \
|
|
--output-directory=/data \
|
|
--results-file="${resultsFile}" \
|
|
--minecraft-version="${VERSION}" \
|
|
--force-reinstall="${FORGE_FORCE_REINSTALL}" "$@"
|
|
}
|
|
|
|
if [[ ${FORGE_INSTALLER} ]]; then
|
|
if ! mc-image-helper-forge --forge-installer="${FORGE_INSTALLER}" ; then
|
|
logError "Failed to installForge given installer ${FORGE_INSTALLER}"
|
|
exit 1
|
|
fi
|
|
else
|
|
if ! mc-image-helper-forge --forge-version="${FORGE_VERSION}"; then
|
|
logError "Failed to install Forge"
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
applyResultsFile ${resultsFile}
|
|
|
|
export FAMILY=FORGE
|
|
|
|
exec "${SCRIPTS:-/}start-setupWorld" "$@"
|