mirror of
https://github.com/itzg/docker-minecraft-server
synced 2025-01-25 10:15:02 +00:00
Download default spigot.yml for PaperMC to top-level directory (#3216)
This commit is contained in:
parent
6514ed85a0
commit
9a20ab7b48
3 changed files with 26 additions and 3 deletions
|
@ -43,10 +43,10 @@ else
|
|||
fi
|
||||
|
||||
# Download default configs to allow for consistent patching
|
||||
for c in paper-global.yml paper-world-defaults.yml spigot.yml; do
|
||||
DOWNLOAD_DEFAULT_CONFIGS+=",${PAPER_CONFIG_DEFAULTS_REPO}/${VERSION}/$c"
|
||||
done
|
||||
DOWNLOAD_DEFAULT_CONFIGS=$(buildDownloadList "$PAPER_CONFIG_DEFAULTS_REPO" "$VERSION" paper-global.yml paper-world-defaults.yml)
|
||||
export DOWNLOAD_DEFAULT_CONFIGS
|
||||
DOWNLOAD_DEFAULTS=$(buildDownloadList "$PAPER_CONFIG_DEFAULTS_REPO" "$VERSION" spigot.yml)
|
||||
export DOWNLOAD_DEFAULTS
|
||||
|
||||
# Normalize on Spigot for downstream operations
|
||||
export FAMILY=SPIGOT
|
||||
|
|
|
@ -36,6 +36,15 @@ if [[ $DOWNLOAD_DEFAULT_CONFIGS ]]; then
|
|||
logWarning "One or more default config files were not available from $DOWNLOAD_DEFAULT_CONFIGS"
|
||||
fi
|
||||
fi
|
||||
if [[ $DOWNLOAD_DEFAULTS ]]; then
|
||||
log "Downloading default top-level configs, if needed"
|
||||
if ! mc-image-helper mcopy \
|
||||
--to /data \
|
||||
--skip-existing --skip-up-to-date=false \
|
||||
"$DOWNLOAD_DEFAULTS" 2> /dev/null; then
|
||||
logWarning "One or more default files were not available from $DOWNLOAD_DEFAULTS"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ${PATCH_DEFINITIONS} ]]; then
|
||||
log "Applying patch definitions from ${PATCH_DEFINITIONS}"
|
||||
|
|
|
@ -513,3 +513,17 @@ function ensureRemoveAllModsOff() {
|
|||
REMOVE_OLD_MODS=false
|
||||
fi
|
||||
}
|
||||
|
||||
function buildDownloadList() {
|
||||
repoUrl=${1?}
|
||||
version=${2?}
|
||||
shift 2
|
||||
result=
|
||||
for c in "${@}"; do
|
||||
if [[ $result ]]; then
|
||||
result+=","
|
||||
fi
|
||||
result+="${repoUrl}/${version}/$c"
|
||||
done
|
||||
echo "$result"
|
||||
}
|
Loading…
Reference in a new issue