Commit 9a20ab7 1 parent 6514ed8 commit 9a20ab7 Copy full SHA for 9a20ab7
File tree 3 files changed +26
-3
lines changed
3 files changed +26
-3
lines changed Original file line number Diff line number Diff line change 43
43
fi
44
44
45
45
# 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)
49
47
export DOWNLOAD_DEFAULT_CONFIGS
48
+ DOWNLOAD_DEFAULTS=$( buildDownloadList " $PAPER_CONFIG_DEFAULTS_REPO " " $VERSION " spigot.yml)
49
+ export DOWNLOAD_DEFAULTS
50
50
51
51
# Normalize on Spigot for downstream operations
52
52
export FAMILY=SPIGOT
Original file line number Diff line number Diff line change @@ -36,6 +36,15 @@ if [[ $DOWNLOAD_DEFAULT_CONFIGS ]]; then
36
36
logWarning " One or more default config files were not available from $DOWNLOAD_DEFAULT_CONFIGS "
37
37
fi
38
38
fi
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
39
48
40
49
if [[ ${PATCH_DEFINITIONS} ]]; then
41
50
log " Applying patch definitions from ${PATCH_DEFINITIONS} "
Original file line number Diff line number Diff line change @@ -513,3 +513,17 @@ function ensureRemoveAllModsOff() {
513
513
REMOVE_OLD_MODS=false
514
514
fi
515
515
}
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