From 0e523434320a90bbfadb43d1ec2a62249a7bbec6 Mon Sep 17 00:00:00 2001 From: Jane Roxanne Date: Sun, 22 Mar 2020 00:38:31 -0500 Subject: [PATCH] fixes --- util/OpenOS/zyneo-update.lua | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/util/OpenOS/zyneo-update.lua b/util/OpenOS/zyneo-update.lua index 063237a..b0ea874 100644 --- a/util/OpenOS/zyneo-update.lua +++ b/util/OpenOS/zyneo-update.lua @@ -4,9 +4,10 @@ local fs = require("filesystem") local comp = require("component") local function dl(url) local dat = "" - for chunk in internet.request(url) do + for chunk in inet.request(url) do dat = dat .. chunk end + return dat end local function writefile(p2, dat) @@ -108,12 +109,14 @@ print("Downloading zorya-neo-update.tsar...") for i=1, #rdat.assets do if (rdat.assets[i].name == "zorya-neo-update.tsar") then arc = dl(rdat.assets[i].browser_download_url) - goto arc_downloaded + goto arcdl end end io.stderr:write("ERROR: zorya-neo-update.tsar not found!\n") -return -::arc_downloaded:: +os.exit(1) + +::arcdl:: + local update = tsar.read(_r, _s, function() end) for ent in fs.list("/etc/zorya-neo/mods") do if (update:exists("mods/"..ent)) then