From 55125be8016ecf3424ea865488f1b1a70dbf31ce Mon Sep 17 00:00:00 2001 From: Daniel Date: Sat, 21 Mar 2020 00:11:26 +0100 Subject: [PATCH 1/2] Fixed latest version fetch I talked about the latest version fetch with the main dev of the game and he told me the index at 'account.vintagestory.at' was not intended so he disabled it. He gave me the link to an official version API and i changed the install script to use it :) --- vintage_story/vintage_story/egg-vintage-story.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vintage_story/vintage_story/egg-vintage-story.json b/vintage_story/vintage_story/egg-vintage-story.json index 1f2ac2ee..7dd9f18d 100644 --- a/vintage_story/vintage_story/egg-vintage-story.json +++ b/vintage_story/vintage_story/egg-vintage-story.json @@ -3,7 +3,7 @@ "meta": { "version": "PTDL_v1" }, - "exported_at": "2020-02-28T20:02:42+01:00", + "exported_at": "2020-03-20T23:54:00+01:00", "name": "Vintage Story", "author": "mail@wuffy.eu", "description": "Vintage Story is an uncompromising wilderness survival sandbox game inspired by lovecraftian horror themes. Find yourself in a ruined world reclaimed by nature and permeated by unnerving temporal disturbances. Relive the advent of human civilization, or take your own path.", @@ -17,7 +17,7 @@ }, "scripts": { "installation": { - "script": "#!\/bin\/ash\r\n# Vintage Story Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\napt update\r\napt install -y screen wget curl\r\n\r\n# Fetching last github release\r\nif [ -z \"${RELEASE_VERSION}\" ] || [ \"${RELEASE_VERSION}\" == \"latest\" ]; then\r\n echo -e \"Using latest release version\"\r\n LATEST=`curl -s4 https:\/\/account.vintagestory.at\/files\/stable\/ | awk -F 'vs_server' '{print $2}' | sed -r '\/^\\s*$\/d' | sed -r 's\/_\/\/' | sed -r 's\/\"\/\/' | sed -r 's\/>\/\/' | grep \".tar.gz$\" | sort --version-sort | tail -n 1`;\r\n DOWNLOAD_URL=https:\/\/account.vintagestory.at\/files\/stable\/vs_server_${LATEST}\r\nelse\r\n echo -e \"Using custom release version\"\r\n DOWNLOAD_URL=https:\/\/account.vintagestory.at\/files\/stable\/vs_server_${RELEASE_VERSION}.tar.gz\r\nfi\r\n\r\ncd \/mnt\/server\/\r\n\r\ncurl -o vs_server.tar.gz ${DOWNLOAD_URL}\r\ntar -xzf vs_server.tar.gz\r\n\r\nrm vs_server.tar.gz", + "script": "#!\/bin\/ash\r\n# Vintage Story Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\napt update\r\napt install -y screen wget curl jq\r\n\r\n# Fetching latest stable server release\r\nif [ -z \"${RELEASE_VERSION}\" ] || [ \"${RELEASE_VERSION}\" == \"latest\" ]; then\r\n DOWNLOAD_URL=`curl -s 'http:\/\/api.vintagestory.at\/stable.json' | jq '[.[]] | .[0].server.urls.cdn' | sed -r 's\/\"\/\/g'`;\r\n# Use specified server release\r\nelse\r\n DOWNLOAD_URL=https:\/\/cdn.vintagestory.at\/gamefiles\/stable\/vs_server_${RELEASE_VERSION}.tar.gz\r\nfi\r\n\r\ncd \/mnt\/server\/\r\n\r\ncurl -o vs_server.tar.gz ${DOWNLOAD_URL}\r\ntar -xzf vs_server.tar.gz\r\n\r\nrm vs_server.tar.gz", "container": "debian:buster-slim", "entrypoint": "bash" } @@ -51,4 +51,4 @@ "rules": "required|integer|max:2000" } ] -} \ No newline at end of file +} From 056a1d817accee7a96beb0eec8bcd5f329fa66cd Mon Sep 17 00:00:00 2001 From: Daniel Date: Sat, 21 Mar 2020 02:24:21 +0100 Subject: [PATCH 2/2] Removed unnecessary sed --- vintage_story/vintage_story/egg-vintage-story.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vintage_story/vintage_story/egg-vintage-story.json b/vintage_story/vintage_story/egg-vintage-story.json index 7dd9f18d..0538ec60 100644 --- a/vintage_story/vintage_story/egg-vintage-story.json +++ b/vintage_story/vintage_story/egg-vintage-story.json @@ -17,7 +17,7 @@ }, "scripts": { "installation": { - "script": "#!\/bin\/ash\r\n# Vintage Story Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\napt update\r\napt install -y screen wget curl jq\r\n\r\n# Fetching latest stable server release\r\nif [ -z \"${RELEASE_VERSION}\" ] || [ \"${RELEASE_VERSION}\" == \"latest\" ]; then\r\n DOWNLOAD_URL=`curl -s 'http:\/\/api.vintagestory.at\/stable.json' | jq '[.[]] | .[0].server.urls.cdn' | sed -r 's\/\"\/\/g'`;\r\n# Use specified server release\r\nelse\r\n DOWNLOAD_URL=https:\/\/cdn.vintagestory.at\/gamefiles\/stable\/vs_server_${RELEASE_VERSION}.tar.gz\r\nfi\r\n\r\ncd \/mnt\/server\/\r\n\r\ncurl -o vs_server.tar.gz ${DOWNLOAD_URL}\r\ntar -xzf vs_server.tar.gz\r\n\r\nrm vs_server.tar.gz", + "script": "#!\/bin\/ash\r\n# Vintage Story Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\napt update\r\napt install -y screen wget curl jq\r\n\r\n# Fetching latest stable server release\r\nif [ -z \"${RELEASE_VERSION}\" ] || [ \"${RELEASE_VERSION}\" == \"latest\" ]; then\r\n DOWNLOAD_URL=`curl -s 'http:\/\/api.vintagestory.at\/stable.json' | jq -r '[.[]] | .[0].server.urls.cdn'`;\r\n# Use specified server release\r\nelse\r\n DOWNLOAD_URL=https:\/\/cdn.vintagestory.at\/gamefiles\/stable\/vs_server_${RELEASE_VERSION}.tar.gz\r\nfi\r\n\r\ncd \/mnt\/server\/\r\n\r\ncurl -o vs_server.tar.gz ${DOWNLOAD_URL}\r\ntar -xzf vs_server.tar.gz\r\n\r\nrm vs_server.tar.gz", "container": "debian:buster-slim", "entrypoint": "bash" }