From 5164ab6e8fcd08c88d9ee3458653b4e1e41759d1 Mon Sep 17 00:00:00 2001 From: Paul M Date: Fri, 12 Aug 2022 11:40:36 -0500 Subject: [PATCH] readme updated and come comments in the code --- README.md | 8 +++++++- update.pl | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 48a41be..1df6bf6 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,9 @@ # Minetest -Minetest related code \ No newline at end of file +My Dev branch for minetest server related code. Currently it contains a mod updater for a minetest server. This is a work in progress, use at your own risk. + +# Notes + +Version checking and comparing works. index.json is the current index of all avaialble minetest mods as pulled from content.minecraft.net. index2.json should be +a current copy from the aforementioned site using the API. index.json can be kept as is after your first run, only index2.json really needs to change for the version +detection to work. I suggest setting up a cron job to refresh index2.jon and rotate out index2.json to index.json if you want the script out put to properly reflect the old version numbers. I'll proably include a small bash script you can run to handle that later. \ No newline at end of file diff --git a/update.pl b/update.pl index d0c56e6..71654a6 100644 --- a/update.pl +++ b/update.pl @@ -11,7 +11,7 @@ use Storable; $updfile = "index.json"; # I could use JSON here, but it might be easier to abuse jq $updlsturl = "https://content.minetest.net/api/packages/"; # give use a json file of everything available -$modpath = "/home/kake26/.var/app/net.minetest.Minetest/.minetest/mods/"; +$modpath = "/home/kake26/.var/app/net.minetest.Minetest/.minetest/mods/"; # where your server stores its mods sub chk_update () {