Add gitea update
This commit is contained in:
parent
230504ea7e
commit
bbb49caf95
@ -17,4 +17,13 @@ if args[1] == "get" then
|
|||||||
handle:write(response.readAll())
|
handle:write(response.readAll())
|
||||||
handle:close()
|
handle:close()
|
||||||
response.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
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user