From 2a15e704b292c4ea969046d1597ef8f729c3214d Mon Sep 17 00:00:00 2001 From: Max <33982882+maxboeer@users.noreply.github.com> Date: Mon, 1 Jun 2026 13:29:41 +0200 Subject: [PATCH] Auto pull dependencies --- compcount.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/compcount.lua b/compcount.lua index 6a3bc52..46dde2c 100644 --- a/compcount.lua +++ b/compcount.lua @@ -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")