diff --git a/gitea.lua b/gitea.lua index 443f164..f598929 100644 --- a/gitea.lua +++ b/gitea.lua @@ -17,4 +17,13 @@ if args[1] == "get" then handle:write(response.readAll()) handle:close() response.close() +if args[2] == "update" then + url = "https://gitea.leafbla.de/dominic/turtles/raw/branch/master/"..filename..".lua" + response = http.get(url) + os.remove(args[3]) + local handle = io.open(args[3], "w") + handle:write(response.readAll()) + handle:close() + response.close() +end end