File tree Expand file tree Collapse file tree 3 files changed +26
-3
lines changed Expand file tree Collapse file tree 3 files changed +26
-3
lines changed Original file line number Diff line number Diff line change 4343fi
4444
4545# Download default configs to allow for consistent patching
46- for c in paper-global.yml paper-world-defaults.yml spigot.yml; do
47- DOWNLOAD_DEFAULT_CONFIGS+=" ,${PAPER_CONFIG_DEFAULTS_REPO} /${VERSION} /$c "
48- done
46+ DOWNLOAD_DEFAULT_CONFIGS=$( buildDownloadList " $PAPER_CONFIG_DEFAULTS_REPO " " $VERSION " paper-global.yml paper-world-defaults.yml)
4947export DOWNLOAD_DEFAULT_CONFIGS
48+ DOWNLOAD_DEFAULTS=$( buildDownloadList " $PAPER_CONFIG_DEFAULTS_REPO " " $VERSION " spigot.yml)
49+ export DOWNLOAD_DEFAULTS
5050
5151# Normalize on Spigot for downstream operations
5252export FAMILY=SPIGOT
Original file line number Diff line number Diff line change @@ -36,6 +36,15 @@ if [[ $DOWNLOAD_DEFAULT_CONFIGS ]]; then
3636 logWarning " One or more default config files were not available from $DOWNLOAD_DEFAULT_CONFIGS "
3737 fi
3838fi
39+ if [[ $DOWNLOAD_DEFAULTS ]]; then
40+ log " Downloading default top-level configs, if needed"
41+ if ! mc-image-helper mcopy \
42+ --to /data \
43+ --skip-existing --skip-up-to-date=false \
44+ " $DOWNLOAD_DEFAULTS " 2> /dev/null; then
45+ logWarning " One or more default files were not available from $DOWNLOAD_DEFAULTS "
46+ fi
47+ fi
3948
4049if [[ ${PATCH_DEFINITIONS} ]]; then
4150 log " Applying patch definitions from ${PATCH_DEFINITIONS} "
Original file line number Diff line number Diff line change @@ -513,3 +513,17 @@ function ensureRemoveAllModsOff() {
513513 REMOVE_OLD_MODS=false
514514 fi
515515}
516+
517+ function buildDownloadList() {
518+ repoUrl=${1?}
519+ version=${2?}
520+ shift 2
521+ result=
522+ for c in " ${@ } " ; do
523+ if [[ $result ]]; then
524+ result+=" ,"
525+ fi
526+ result+=" ${repoUrl} /${version} /$c "
527+ done
528+ echo " $result "
529+ }
You can’t perform that action at this time.
0 commit comments