2023-01-09 01:15:24 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -eu
|
|
|
|
|
|
|
|
# shellcheck source=start-utils
|
|
|
|
. "${SCRIPTS:-/}start-utils"
|
|
|
|
|
|
|
|
: "${CF_PAGE_URL:=}"
|
|
|
|
: "${CF_SLUG:=}"
|
|
|
|
: "${CF_FILE_ID:=}"
|
|
|
|
: "${CF_FILENAME_MATCHER:=}"
|
2023-01-13 00:59:12 +00:00
|
|
|
: "${CF_PARALLEL_DOWNLOADS:=4}"
|
|
|
|
: "${CF_FORCE_SYNCHRONIZE:=false}"
|
2023-01-09 01:15:24 +00:00
|
|
|
|
|
|
|
resultsFile=/data/.install-curseforge.env
|
|
|
|
|
|
|
|
isDebugging && set -x
|
|
|
|
|
|
|
|
args=(
|
|
|
|
--results-file="$resultsFile"
|
|
|
|
)
|
|
|
|
if [[ $CF_PAGE_URL ]]; then
|
|
|
|
args+=(--modpack-page-url="$CF_PAGE_URL")
|
|
|
|
fi
|
|
|
|
if [[ $CF_FILE_ID ]]; then
|
|
|
|
args+=(--file-id="$CF_FILE_ID")
|
|
|
|
fi
|
|
|
|
if [[ $CF_SLUG ]]; then
|
|
|
|
args+=(--slug="$CF_SLUG")
|
|
|
|
fi
|
|
|
|
if [[ $CF_FILENAME_MATCHER ]]; then
|
|
|
|
args+=(--filename-matcher="$CF_FILENAME_MATCHER")
|
|
|
|
fi
|
2023-01-13 00:59:12 +00:00
|
|
|
args+=(
|
|
|
|
--parallel-downloads="$CF_PARALLEL_DOWNLOADS"
|
|
|
|
--force-synchronize="$CF_FORCE_SYNCHRONIZE"
|
|
|
|
)
|
2023-01-09 01:15:24 +00:00
|
|
|
|
2023-01-12 14:39:28 +00:00
|
|
|
defaultModExcludes=(
|
2023-01-13 02:37:20 +00:00
|
|
|
581495 # oculus
|
2023-01-12 14:39:28 +00:00
|
|
|
363363 # extreme-sound-muffler
|
|
|
|
448233 # entityculling
|
|
|
|
574856 # rubidium
|
2023-01-13 02:37:20 +00:00
|
|
|
441114 # nekos-enchanted-books
|
|
|
|
521480 # skin-layers-3d
|
|
|
|
433760 # not-enough-animations
|
|
|
|
568563 # entity-texture-features-fabric
|
|
|
|
274259 # carry-on
|
2023-01-13 03:46:04 +00:00
|
|
|
787666 # ignitioncoil, not a client mod, but doesn't seem to play nice with server mode
|
|
|
|
700629 # defensive-measures
|
2023-01-12 14:39:28 +00:00
|
|
|
)
|
2023-01-13 03:46:04 +00:00
|
|
|
: "${CF_EXCLUDE_MODS:=${defaultModExcludes[@]}}"
|
|
|
|
args+=(--exclude-mods="$CF_EXCLUDE_MODS")
|
2023-01-12 14:39:28 +00:00
|
|
|
|
2023-01-13 02:37:20 +00:00
|
|
|
defaultModForceIncludes=(
|
|
|
|
656526 # revelationary
|
|
|
|
)
|
|
|
|
: "${CF_FORCE_INCLUDE_MODS:=${defaultModForceIncludes[@]}}"
|
|
|
|
args+=(--force-include-mods="$CF_FORCE_INCLUDE_MODS")
|
|
|
|
|
2023-01-09 01:15:24 +00:00
|
|
|
if ! mc-image-helper install-curseforge "${args[@]}"; then
|
|
|
|
log "ERROR failed to auto-install CurseForge modpack"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
# grab SERVER, FAMILY and export it
|
|
|
|
set -a
|
|
|
|
# shellcheck disable=SC1090
|
|
|
|
source "${resultsFile}"
|
|
|
|
set +a
|
|
|
|
|
|
|
|
exec "${SCRIPTS:-/}start-setupWorld" "$@"
|