2017-11-01 05:42:44 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2022-10-16 22:49:25 +00:00
|
|
|
: "${FORGE_VERSION:=${FORGEVERSION:-RECOMMENDED}}"
|
|
|
|
: "${FORGE_FORCE_REINSTALL:=false}}"
|
2021-10-17 03:32:34 +00:00
|
|
|
|
|
|
|
# shellcheck source=start-utils
|
|
|
|
. "${SCRIPTS:-$(dirname "$0")}/start-utils"
|
2021-03-11 22:21:59 +00:00
|
|
|
isDebugging && set -x
|
2024-10-22 21:04:38 +00:00
|
|
|
resultsFile=/data/.run-forge.env
|
2017-11-01 05:42:44 +00:00
|
|
|
|
2024-10-22 21:04:38 +00:00
|
|
|
function mc-image-helper-forge() {
|
|
|
|
mc-image-helper install-forge \
|
2023-01-01 15:12:39 +00:00
|
|
|
--output-directory=/data \
|
2024-10-22 21:04:38 +00:00
|
|
|
--results-file="${resultsFile}" \
|
2023-03-15 03:10:21 +00:00
|
|
|
--minecraft-version="${VERSION}" \
|
2024-10-22 21:04:38 +00:00
|
|
|
--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}"
|
2023-01-01 15:12:39 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
else
|
2024-10-22 21:04:38 +00:00
|
|
|
if ! mc-image-helper-forge --forge-version="${FORGE_VERSION}"; then
|
|
|
|
logError "Failed to install Forge"
|
2023-01-01 15:12:39 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
2017-11-01 05:42:44 +00:00
|
|
|
fi
|
|
|
|
|
2024-10-22 21:04:38 +00:00
|
|
|
applyResultsFile ${resultsFile}
|
2022-08-14 18:34:08 +00:00
|
|
|
|
2021-12-11 02:50:40 +00:00
|
|
|
export FAMILY=FORGE
|
2022-01-29 20:53:34 +00:00
|
|
|
|
2021-10-20 20:36:02 +00:00
|
|
|
exec "${SCRIPTS:-/}start-setupWorld" "$@"
|