mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-07-03 23:44:16 +00:00
Disable REMOVE_OLD_MODS when it interferes with managed mod/plugin features (#2648)
This commit is contained in:
@@ -24,6 +24,8 @@ resultsFile=/data/.install-curseforge.env
|
|||||||
|
|
||||||
isDebugging && set -x
|
isDebugging && set -x
|
||||||
|
|
||||||
|
ensureRemoveAllModsOff "MOD_PLATFORM=AUTO_CURSEFORGE"
|
||||||
|
|
||||||
args=(
|
args=(
|
||||||
--results-file="$resultsFile"
|
--results-file="$resultsFile"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -19,6 +19,8 @@ fi
|
|||||||
|
|
||||||
isDebugging && set -x
|
isDebugging && set -x
|
||||||
|
|
||||||
|
ensureRemoveAllModsOff "MOD_PLATFORM=MODRINTH"
|
||||||
|
|
||||||
args=(
|
args=(
|
||||||
--results-file="$resultsFile"
|
--results-file="$resultsFile"
|
||||||
--project="${MODRINTH_MODPACK}"
|
--project="${MODRINTH_MODPACK}"
|
||||||
|
|||||||
@@ -83,6 +83,9 @@ fi
|
|||||||
function handleListings() {
|
function handleListings() {
|
||||||
if usesMods && usesPlugins; then
|
if usesMods && usesPlugins; then
|
||||||
if [[ "$MODS" ]]; then
|
if [[ "$MODS" ]]; then
|
||||||
|
|
||||||
|
ensureRemoveAllModsOff "MODS is set"
|
||||||
|
|
||||||
mkdir -p "$MODS_OUT_DIR"
|
mkdir -p "$MODS_OUT_DIR"
|
||||||
mc-image-helper mcopy \
|
mc-image-helper mcopy \
|
||||||
--glob=*.jar \
|
--glob=*.jar \
|
||||||
@@ -91,6 +94,7 @@ function handleListings() {
|
|||||||
"$MODS"
|
"$MODS"
|
||||||
fi
|
fi
|
||||||
if [[ "$PLUGINS" ]]; then
|
if [[ "$PLUGINS" ]]; then
|
||||||
|
ensureRemoveAllModsOff "PLUGINS is set"
|
||||||
mkdir -p "$PLUGINS_OUT_DIR"
|
mkdir -p "$PLUGINS_OUT_DIR"
|
||||||
mc-image-helper mcopy \
|
mc-image-helper mcopy \
|
||||||
--glob=*.jar \
|
--glob=*.jar \
|
||||||
@@ -100,6 +104,7 @@ function handleListings() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$MODS_FILE" ]]; then
|
if [[ "$MODS_FILE" ]]; then
|
||||||
|
ensureRemoveAllModsOff "MODS_FILE is set"
|
||||||
mkdir -p "$MODS_OUT_DIR"
|
mkdir -p "$MODS_OUT_DIR"
|
||||||
mc-image-helper mcopy \
|
mc-image-helper mcopy \
|
||||||
--file-is-listing \
|
--file-is-listing \
|
||||||
@@ -108,6 +113,7 @@ function handleListings() {
|
|||||||
"$MODS_FILE"
|
"$MODS_FILE"
|
||||||
fi
|
fi
|
||||||
if [[ "$PLUGINS_FILE" ]]; then
|
if [[ "$PLUGINS_FILE" ]]; then
|
||||||
|
ensureRemoveAllModsOff "PLUGINS_FILE is set"
|
||||||
mkdir -p "$PLUGINS_OUT_DIR"
|
mkdir -p "$PLUGINS_OUT_DIR"
|
||||||
mc-image-helper mcopy \
|
mc-image-helper mcopy \
|
||||||
--file-is-listing \
|
--file-is-listing \
|
||||||
@@ -123,6 +129,7 @@ function handleListings() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$MODS" || "$PLUGINS" ]]; then
|
if [[ "$MODS" || "$PLUGINS" ]]; then
|
||||||
|
ensureRemoveAllModsOff "MODS or PLUGINS is set"
|
||||||
mkdir -p "$outDir"
|
mkdir -p "$outDir"
|
||||||
mc-image-helper mcopy \
|
mc-image-helper mcopy \
|
||||||
--glob=*.jar \
|
--glob=*.jar \
|
||||||
@@ -132,6 +139,7 @@ function handleListings() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$MODS_FILE" || "$PLUGINS_FILE" ]]; then
|
if [[ "$MODS_FILE" || "$PLUGINS_FILE" ]]; then
|
||||||
|
ensureRemoveAllModsOff "MODS_FILE or PLUGINS_FILE is set"
|
||||||
mkdir -p "$outDir"
|
mkdir -p "$outDir"
|
||||||
mc-image-helper mcopy \
|
mc-image-helper mcopy \
|
||||||
--file-is-listing \
|
--file-is-listing \
|
||||||
|
|||||||
@@ -347,4 +347,13 @@ function resolveFamily() {
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
export FAMILY
|
export FAMILY
|
||||||
|
}
|
||||||
|
|
||||||
|
function ensureRemoveAllModsOff() {
|
||||||
|
reason=${1?}
|
||||||
|
|
||||||
|
if isTrue "${REMOVE_OLD_MODS:-false}"; then
|
||||||
|
log "WARNING using REMOVE_OLDS_MODS interferes with $reason -- it is now disabled"
|
||||||
|
REMOVE_OLD_MODS=false
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user