From 195513ff14d18b5dcbd8d833fd43c98db632baa6 Mon Sep 17 00:00:00 2001 From: Michael Parker Date: Fri, 12 Jul 2019 16:30:46 -0400 Subject: [PATCH] update the force enhanced install script This is a fix for the install script for forge. --- minecraft_java/forge/forge-generic/egg-forge-enhanced.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/minecraft_java/forge/forge-generic/egg-forge-enhanced.json b/minecraft_java/forge/forge-generic/egg-forge-enhanced.json index 9b30a67d..3c47856e 100644 --- a/minecraft_java/forge/forge-generic/egg-forge-enhanced.json +++ b/minecraft_java/forge/forge-generic/egg-forge-enhanced.json @@ -3,7 +3,7 @@ "meta": { "version": "PTDL_v1" }, - "exported_at": "2019-06-16T08:09:35-04:00", + "exported_at": "2019-07-12T16:29:11-04:00", "name": "Forge Enhanced", "author": "parker@parkervcp.com", "description": "Minecraft Forge Server. Minecraft Forge is a modding API (Application Programming Interface), which makes it easier to create mods, and also make sure mods are compatible with each other.", @@ -17,7 +17,7 @@ }, "scripts": { "installation": { - "script": "#!\/bin\/bash\r\n# Forge Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\napt update\r\napt install -y curl\r\n\r\n#Fetching version\r\nif [ -z \"$MC_VERSION\" ] || [ \"$MC_VERSION\" == \"latest\" ]; then\r\n echo \"Fetching latest\"\r\n FORGE_VERSION=$(curl -sl https:\/\/files.minecraftforge.net\/maven\/net\/minecraftforge\/forge\/index.html | grep -A 2 \"Latest\" | awk NF=NF RS= OFS=\" \" | grep -o -e '[1]\\.[0-9][0-9]\\?\\.\\?[0-9]\\?[0-9] - [0-9][0-9]\\.[0-9][0-9]\\.[0-9]\\?[0-9]\\.[0-9][0-9][0-9][0-9]' | sed 's\/ \/\/g')\r\nelif [[ ! \"$MC_VERSION\" =~ - ]]; then\r\n echo \"Fetching latest from version $MC_VERSION\"\r\n FORGE_VERSION=$(curl -sl https:\/\/files.minecraftforge.net\/maven\/net\/minecraftforge\/forge\/index_$MC_VERSION.html | grep -A 2 \"Latest\" | awk NF=NF RS= OFS=\" \" | grep -o -e '[1]\\.[0-9][0-9]\\?\\.\\?[0-9]\\?[0-9] - [0-9][0-9]\\.[0-9][0-9]\\.[0-9]\\?[0-9]\\.[0-9][0-9][0-9][0-9]' | sed 's\/ \/\/g')\r\nfi\r\n\r\nif [ ${MC_VERSION} == \"1.7.10\" ] || [ ${MC_VERSION} == \"1.8.9\" ]; then\r\n\tFORGE_VERSION=\"${FORGE_VERSION}-${MC_VERSION}\"\r\nfi\r\n\r\n#Checking if forge version valid\r\nif [[ ! \"$FORGE_VERSION\" =~ [0-9]?[0-9]?\\.[0-9]?[0-9]?\\.?[0-9]?[0-9]-[0-9]?[0-9]\\.[0-9]?[0-9]\\.[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]?[0-9] ]]; then\r\n echo \"!!! Invalid forge version \\\"$FORGE_VERSION\\\" !!!\"\r\n exit\r\nfi\r\n\r\nif [ ${MCVER} == \"1.7.10\" ] || [ ${MCVER} == \"1.8.9\" ]; then\r\n\tFORGE=\"${FORGE}-${MCVER}\"\r\nfi\r\n\r\n#Go into main direction\r\ncd \/mnt\/server\r\n\r\n#Adding .jar when not eding by SERVER_JARFILE\r\nif [[ ! $SERVER_JARFILE = *\\.jar ]]; then\r\n SERVER_JARFILE=\"$SERVER_JARFILE.jar\"\r\nfi\r\n\r\n#Downloading jars\r\necho -e \"Downloading forge version \\\"$MC_VERSION\\\"\"\r\ncurl -o installer.jar -sS https:\/\/files.minecraftforge.net\/maven\/net\/minecraftforge\/forge\/$MC_VERSION\/forge-$MC_VERSION-installer.jar\r\ncurl -o $SERVER_JARFILE -sS https:\/\/files.minecraftforge.net\/maven\/net\/minecraftforge\/forge\/$MC_VERSION\/forge-$MC_VERSION-universal.jar\r\n\r\n#Checking if downloaded jars exist\r\nif [ ! -f .\/installer.jar ] || [ ! -f .\/$SERVER_JARFILE ]; then\r\n echo \"!!! Error by downloading forge version \\\"$MC_VERSION\\\" !!!\"\r\n exit\r\nfi\r\n\r\n#Installing server\r\necho -e \"Installing forge server.\\n\"\r\njava -jar installer.jar --installServer\r\n\r\n#Deleting installer.jar\r\necho -e \"Deleting installer.jar file.\\n\"\r\nrm -rf installer.jar", + "script": "#!\/bin\/bash\r\n# Forge Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\napt update\r\napt install -y curl\r\n\r\n#Fetching version\r\nif [ -z \"${MC_VERSION}\" ] || [ \"${MC_VERSION}\" == \"latest\" ]; then\r\n echo \"Fetching latest\"\r\n FORGE_VERSION=$(curl -sl https:\/\/files.minecraftforge.net\/maven\/net\/minecraftforge\/forge\/index.html | grep -A 2 \"Latest\" | awk NF=NF RS= OFS=\" \" | grep -o -e '[1]\\.[0-9][0-9]\\?\\.\\?[0-9]\\?[0-9] - [0-9][0-9]\\.[0-9][0-9]\\.[0-9]\\?[0-9]\\.[0-9][0-9][0-9][0-9]' | sed 's\/ \/\/g')\r\nelif [[ ! \"${MC_VERSION}\" =~ - ]]; then\r\n echo \"Fetching latest from version $MC_VERSION\"\r\n FORGE_VERSION=$(curl -sl https:\/\/files.minecraftforge.net\/maven\/net\/minecraftforge\/forge\/index_${MC_VERSION}.html | grep -A 2 \"Latest\" | awk NF=NF RS= OFS=\" \" | grep -o -e '[1]\\.[0-9][0-9]\\?\\.\\?[0-9]\\?[0-9] - [0-9][0-9]\\.[0-9][0-9]\\.[0-9]\\?[0-9]\\.[0-9][0-9][0-9][0-9]' | sed 's\/ \/\/g')\r\nfi\r\n\r\nif [ -z ${MC_VERSION} ]; then\r\n echo -e \"\"\r\nelse\r\n if [ ${MC_VERSION} == \"1.7.10\" ] || [ ${MC_VERSION} == \"1.8.9\" ]; then\r\n echo -e \"correcting forge version to ${FORGE_VERSION}-${MC_VERSION}\"\r\n\t FORGE_VERSION=\"${FORGE_VERSION}-${MC_VERSION}\"\r\n fi\r\nfi\r\n\r\n#Checking if forge version valid\r\nif [[ ! \"$FORGE_VERSION\" =~ [0-9]?[0-9]?\\.[0-9]?[0-9]?\\.?[0-9]?[0-9]-[0-9]?[0-9]\\.[0-9]?[0-9]\\.[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]?[0-9] ]]; then\r\n echo \"!!! Invalid forge version \\\"$FORGE_VERSION\\\" !!!\"\r\n exit\r\nfi\r\n\r\n#Go into main direction\r\ncd \/mnt\/server\r\n\r\n#Adding .jar when not eding by SERVER_JARFILE\r\nif [[ ! $SERVER_JARFILE = *\\.jar ]]; then\r\n SERVER_JARFILE=\"$SERVER_JARFILE.jar\"\r\nfi\r\n\r\n#Downloading jars\r\necho -e \"Downloading forge version ${FORGE_VERSION}\"\r\ncurl -o installer.jar -sS https:\/\/files.minecraftforge.net\/maven\/net\/minecraftforge\/forge\/${FORGE_VERSION}\/forge-${FORGE_VERSION}-installer.jar\r\ncurl -o $SERVER_JARFILE -sS https:\/\/files.minecraftforge.net\/maven\/net\/minecraftforge\/forge\/${FORGE_VERSION}\/forge-${FORGE_VERSION}-universal.jar\r\n\r\n#Checking if downloaded jars exist\r\nif [ ! -f .\/installer.jar ] || [ ! -f .\/$SERVER_JARFILE ]; then\r\n echo \"!!! Error by downloading forge version ${FORGE_VERSION} !!!\"\r\n exit\r\nfi\r\n\r\n#Installing server\r\necho -e \"Installing forge server.\\n\"\r\njava -jar installer.jar --installServer\r\n\r\n#Deleting installer.jar\r\necho -e \"Deleting installer.jar file.\\n\"\r\nrm -rf installer.jar", "container": "openjdk:8", "entrypoint": "bash" }