mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-10-10 22:17:13 +00:00
SpongeVanilla integration and JSON check fix
This commit is contained in:
1 parent
ee5a95baa8
commit
f178c6c0a1
4 files changed
+54
-8
No files matched your search
@@ -24,12 +24,17 @@ if [ -n "$ICON" -a ! -e server-icon.png ]; then
|
||||
fi
|
||||
|
||||
# Make sure files exist and are valid JSON (for pre-1.12 to 1.12 upgrades)
|
||||
for j in *.json; do
|
||||
if [[ $(python -c "print open('$j').read().strip()==''") = True ]]; then
|
||||
echo "Fixing JSON $j"
|
||||
echo '[]' > $j
|
||||
fi
|
||||
done
|
||||
if [[ -z "ls *.json" ]]; then
|
||||
echo "Checking JSON files"
|
||||
for j in *.json; do
|
||||
if [[ $(python -c "print open('$j').read().strip()==''") = True ]]; then
|
||||
echo "Fixing JSON $j"
|
||||
echo '[]' > $j
|
||||
fi
|
||||
done
|
||||
else
|
||||
echo "Skipping JSON check. No files present."
|
||||
fi
|
||||
|
||||
# If any modules have been provided, copy them over
|
||||
mkdir -p /data/mods
|
||||
|
||||
Reference in new issue
Block a user