mirror of
https://github.com/itzg/docker-minecraft-server
synced 2024-11-10 06:14:14 +00:00
Corrected REMOVE_OLD_MODS to process file-wise (#2317)
This commit is contained in:
parent
2fbe2bbe68
commit
3ffcbb32dd
1 changed files with 11 additions and 8 deletions
|
@ -208,14 +208,17 @@ eula=${EULA,,}
|
|||
function removeOldMods {
|
||||
if [ -d "$1" ]; then
|
||||
log "Removing old mods including:${REMOVE_OLD_MODS_INCLUDE} excluding:${REMOVE_OLD_MODS_EXCLUDE}"
|
||||
mc-image-helper find \
|
||||
--delete \
|
||||
--type file,directory \
|
||||
--min-depth=1 --max-depth "${REMOVE_OLD_MODS_DEPTH:-16}" \
|
||||
--name "${REMOVE_OLD_MODS_INCLUDE:-*}" \
|
||||
--exclude-name "${REMOVE_OLD_MODS_EXCLUDE:-}" \
|
||||
--quiet \
|
||||
"$1"
|
||||
args=(
|
||||
--delete
|
||||
--type file
|
||||
--min-depth=1 --max-depth "${REMOVE_OLD_MODS_DEPTH:-16}"
|
||||
--name "${REMOVE_OLD_MODS_INCLUDE:-*}"
|
||||
--exclude-name "${REMOVE_OLD_MODS_EXCLUDE:-}"
|
||||
)
|
||||
if ! isDebugging; then
|
||||
args+=(--quiet)
|
||||
fi
|
||||
mc-image-helper find "${args[@]}" "$1"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue