mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2024-06-07 19:40:43 +00:00
fix(minecraft/entrypoint): several small defects with manifest loop
This commit is contained in:
parent
301e33f224
commit
b38c00881b
@ -75,12 +75,17 @@ if [[ "$MANIFEST" ]]; then
|
|||||||
case "X$MANIFEST" in
|
case "X$MANIFEST" in
|
||||||
X*.json)
|
X*.json)
|
||||||
if [ -f "${MANIFEST}" ]; then
|
if [ -f "${MANIFEST}" ]; then
|
||||||
jq --slurpfile m "${MANIFEST}" '$m.files | (.projectID|tostring) + " " + (.fileID|tostring)'| while read -r p f
|
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
|
||||||
do
|
do
|
||||||
url="${CURSE_URL_BASE}/${p}/files/${f}/download"
|
if [ ! -f $MOD_DIR/${p}_${f}.jar ]
|
||||||
echo Downloading curseforge mod $url
|
then
|
||||||
# Manifest usually doesn't have mod names. Using id should be fine, tho
|
url="${CURSE_URL_BASE}/${p}/files/${f}/download"
|
||||||
curl -sSL -o /data/mods/${p}_${f}.jar
|
echo Downloading curseforge mod $url
|
||||||
|
# Manifest usually doesn't have mod names. Using id should be fine, tho
|
||||||
|
curl -sSL "${url}" -o $MOD_DIR/${p}_${f}.jar
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
echo "Could not find manifest file, unsufficient privs, or malformed path."
|
echo "Could not find manifest file, unsufficient privs, or malformed path."
|
||||||
|
Loading…
Reference in New Issue
Block a user