Auto pull dependencies

This commit is contained in:
Max
2026-06-01 13:29:41 +02:00
parent 991bc5eb3e
commit 2a15e704b2
+13
View File
@@ -8,6 +8,19 @@ local SCREEN_WIDTH, SCREEN_HEIGHT = mon.getSize()
local oldTerm = term.redirect(mon)
local function ensureDependency(path, url)
if fs.exists(path) then
return
end
assert(shell and type(shell.run) == "function", "Shell API nicht verfuegbar")
assert(shell.run("wget", url, path) and fs.exists(path), "Konnte Abhaengigkeit nicht laden: " .. path)
end
ensureDependency("Pine3D.lua", "https://raw.githubusercontent.com/Xella37/Pine3D/main/Pine3D.lua")
ensureDependency("betterblittle.lua", "https://raw.githubusercontent.com/Xella37/Pine3D/main/betterblittle.lua")
ensureDependency("morefonts-pe.lua", "https://raw.githubusercontent.com/MichielP1807/more-fonts/main/pine3d/morefonts-pe.lua")
local Pine3D = require("Pine3D")
local mf = require("morefonts-pe")