mirror of
https://github.com/Adorable-Catgirl/Zorya-NEO.git
synced 2024-11-23 10:48:06 +11:00
fixes
This commit is contained in:
parent
f5d18e6dbe
commit
0e52343432
@ -4,9 +4,10 @@ local fs = require("filesystem")
|
|||||||
local comp = require("component")
|
local comp = require("component")
|
||||||
local function dl(url)
|
local function dl(url)
|
||||||
local dat = ""
|
local dat = ""
|
||||||
for chunk in internet.request(url) do
|
for chunk in inet.request(url) do
|
||||||
dat = dat .. chunk
|
dat = dat .. chunk
|
||||||
end
|
end
|
||||||
|
return dat
|
||||||
end
|
end
|
||||||
|
|
||||||
local function writefile(p2, dat)
|
local function writefile(p2, dat)
|
||||||
@ -108,12 +109,14 @@ print("Downloading zorya-neo-update.tsar...")
|
|||||||
for i=1, #rdat.assets do
|
for i=1, #rdat.assets do
|
||||||
if (rdat.assets[i].name == "zorya-neo-update.tsar") then
|
if (rdat.assets[i].name == "zorya-neo-update.tsar") then
|
||||||
arc = dl(rdat.assets[i].browser_download_url)
|
arc = dl(rdat.assets[i].browser_download_url)
|
||||||
goto arc_downloaded
|
goto arcdl
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
io.stderr:write("ERROR: zorya-neo-update.tsar not found!\n")
|
io.stderr:write("ERROR: zorya-neo-update.tsar not found!\n")
|
||||||
return
|
os.exit(1)
|
||||||
::arc_downloaded::
|
|
||||||
|
::arcdl::
|
||||||
|
|
||||||
local update = tsar.read(_r, _s, function() end)
|
local update = tsar.read(_r, _s, function() end)
|
||||||
for ent in fs.list("/etc/zorya-neo/mods") do
|
for ent in fs.list("/etc/zorya-neo/mods") do
|
||||||
if (update:exists("mods/"..ent)) then
|
if (update:exists("mods/"..ent)) then
|
||||||
|
Loading…
Reference in New Issue
Block a user