From fff075cc68665c60040783c40c4aed2accf7c37c Mon Sep 17 00:00:00 2001 From: Jeremy White Date: Thu, 14 Feb 2019 22:04:09 -0500 Subject: [PATCH 1/2] fix(minecraft/entrypoint): errata with jq syntax and mod dir --- minecraft-server/start-finalSetup02Modpack | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/minecraft-server/start-finalSetup02Modpack b/minecraft-server/start-finalSetup02Modpack index 29462159..cf5bb51e 100755 --- a/minecraft-server/start-finalSetup02Modpack +++ b/minecraft-server/start-finalSetup02Modpack @@ -75,9 +75,9 @@ if [[ "$MANIFEST" ]]; then case "X$MANIFEST" in X*.json) if [ -f "${MANIFEST}" ]; then - MOD_DIR=${FTB_BASE_DIR:-/data/mods} + MOD_DIR=${FTB_BASE_DIR:-/data}/mods echo "Starting manifest download..." - cat "${MANIFEST}" | jq -r '$.files[] | (.projectID|tostring) + " " + (.fileID|tostring)'| while read -r p f + cat "${MANIFEST}" | jq -r '.files[] | (.projectID|tostring) + " " + (.fileID|tostring)'| while read -r p f do if [ ! -f $MOD_DIR/${p}_${f}.jar ] then From f3d5e75c2298f66e0ed9a54db1b05a761b80efaf Mon Sep 17 00:00:00 2001 From: Jeremy White Date: Thu, 14 Feb 2019 22:18:16 -0500 Subject: [PATCH 2/2] fix(minecraft/entrypoint): create mods dir for packages without it --- minecraft-server/start-finalSetup02Modpack | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/minecraft-server/start-finalSetup02Modpack b/minecraft-server/start-finalSetup02Modpack index cf5bb51e..43b53892 100755 --- a/minecraft-server/start-finalSetup02Modpack +++ b/minecraft-server/start-finalSetup02Modpack @@ -76,6 +76,11 @@ case "X$MANIFEST" in X*.json) if [ -f "${MANIFEST}" ]; then MOD_DIR=${FTB_BASE_DIR:-/data}/mods + if [ ! -d "$MOD_DIR" ] + then + echo "Creating mods dir $MOD_DIR" + mkdir -p "$MOD_DIR" + fi echo "Starting manifest download..." cat "${MANIFEST}" | jq -r '.files[] | (.projectID|tostring) + " " + (.fileID|tostring)'| while read -r p f do