mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-10-11 14:37:13 +00:00
Choose shortest path for generic pack base (#1608)
Co-authored-by: Cayce House <cayce@house.email>
This commit is contained in:
1 parent
76628e8ccc
commit
16a958d129
1 file changed
+1
-1
@@ -235,7 +235,7 @@ function genericPacks() {
|
|||||||
done
|
done
|
||||||
|
|
||||||
# recalculate the actual base directory of content
|
# recalculate the actual base directory of content
|
||||||
base_dir=$(find "$base_dir" -maxdepth 3 -type d \( -name mods -o -name plugins -o -name config \) -printf '%h' -quit)
|
base_dir=$(find "$base_dir" -maxdepth 3 -type d \( -name mods -o -name plugins -o -name config \) -printf '%h\n' | awk '{ print length, $0 }' | sort -n -s | cut -d" " -f2- | head -n1 | xargs echo -n)
|
||||||
if [[ ! $base_dir ]]; then
|
if [[ ! $base_dir ]]; then
|
||||||
log "ERROR: Unable to find content base of generic packs ${GENERIC_PACKS}. Directories:"
|
log "ERROR: Unable to find content base of generic packs ${GENERIC_PACKS}. Directories:"
|
||||||
find $original_base_dir -maxdepth 3 -type d -printf ' - %P\n'
|
find $original_base_dir -maxdepth 3 -type d -printf ' - %P\n'
|
||||||
|
|||||||
Reference in new issue
Block a user