mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-10-18 01:18:11 +00:00
Download default spigot.yml for PaperMC to top-level directory (#3216)
This commit is contained in:
1 parent
6514ed85a0
commit
9a20ab7b48
3 files changed
+26
-3
No files matched your search
@@ -43,10 +43,10 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Download default configs to allow for consistent patching
|
# Download default configs to allow for consistent patching
|
||||||
for c in paper-global.yml paper-world-defaults.yml spigot.yml; do
|
DOWNLOAD_DEFAULT_CONFIGS=$(buildDownloadList "$PAPER_CONFIG_DEFAULTS_REPO" "$VERSION" paper-global.yml paper-world-defaults.yml)
|
||||||
DOWNLOAD_DEFAULT_CONFIGS+=",${PAPER_CONFIG_DEFAULTS_REPO}/${VERSION}/$c"
|
|
||||||
done
|
|
||||||
export DOWNLOAD_DEFAULT_CONFIGS
|
export DOWNLOAD_DEFAULT_CONFIGS
|
||||||
|
DOWNLOAD_DEFAULTS=$(buildDownloadList "$PAPER_CONFIG_DEFAULTS_REPO" "$VERSION" spigot.yml)
|
||||||
|
export DOWNLOAD_DEFAULTS
|
||||||
|
|
||||||
# Normalize on Spigot for downstream operations
|
# Normalize on Spigot for downstream operations
|
||||||
export FAMILY=SPIGOT
|
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"
|
logWarning "One or more default config files were not available from $DOWNLOAD_DEFAULT_CONFIGS"
|
||||||
fi
|
fi
|
||||||
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
|
if [[ ${PATCH_DEFINITIONS} ]]; then
|
||||||
log "Applying patch definitions from ${PATCH_DEFINITIONS}"
|
log "Applying patch definitions from ${PATCH_DEFINITIONS}"
|
||||||
|
|||||||
@@ -513,3 +513,17 @@ function ensureRemoveAllModsOff() {
|
|||||||
REMOVE_OLD_MODS=false
|
REMOVE_OLD_MODS=false
|
||||||
fi
|
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"
|
||||||
|
}
|
||||||
Reference in new issue
Block a user