Dev mode (auto-run updater)

This commit is contained in:
Rph :3 2025-03-27 18:53:48 +01:00
parent 2fcea0909d
commit e5cd5c6e71
No known key found for this signature in database

View File

@ -2,6 +2,14 @@
-- This script is only responsible for killing rednet and jumping to the kernel
-- based on some code rph wrote and gave me
if settings.get("snowier.auto_update") then
local defaultRoot = "https://git.colon-three.com/kodi/snowier/raw/branch/main/"
local repoRoot = settings.get("snowier.repo_base") or defaultRoot
shell.run("wget run " .. repoRoot .. "install.lua")
end
local function main()
if not _G["rednet"] then
return
@ -27,7 +35,10 @@ local function main()
_G.printError = p
_G.os.pullEventRaw = o
_G["rednet"] = nil
os.run({}, "/kernel/entry.lua")
os.run({
-- This is an odd hack. We should look into not doing this to run the kernel.
["require"]=require
}, "/kernel/entry.lua")
end
print("[D] Queueing bogus modem message")