iteration
This commit is contained in:
parent
8888c12733
commit
9e3c18bfb3
20
lupdate.lua
20
lupdate.lua
@ -6,15 +6,15 @@ if program_name == nil then
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
http.get("https://gitea.layla.gg/layla/computercraft/raw/branch/main/" .. program_name .. ".lua", nil, function(response)
|
response = http.get("https://gitea.layla.gg/layla/computercraft/raw/branch/main/" .. program_name .. ".lua", nil)
|
||||||
if response.getResponseCode() == 200 then
|
|
||||||
local file = fs.open(program_name .. ".lua", "w")
|
if response.getResponseCode() == 200 then
|
||||||
file.write(response.readAll())
|
local file = fs.open(program_name .. ".lua", "w")
|
||||||
file.close()
|
file.write(response.readAll())
|
||||||
print("Updated " .. program_name .. ".lua")
|
file.close()
|
||||||
else
|
print("Updated " .. program_name .. ".lua")
|
||||||
print("Failed to update " .. program_name .. ".lua")
|
else
|
||||||
print(response)
|
print("Failed to update " .. program_name .. ".lua")
|
||||||
end
|
print(response)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user