From bda360e2af4b9d0da0f5957e0c737ea39863719a Mon Sep 17 00:00:00 2001 From: Aki Date: Tue, 2 Jan 2024 01:50:08 +0100 Subject: Implemented stub engine detection, package checks and installs --- ensure.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'ensure.lua') diff --git a/ensure.lua b/ensure.lua index 0dd264b..8f46063 100644 --- a/ensure.lua +++ b/ensure.lua @@ -1,10 +1,9 @@ #!/usr/bin/env lua local l = require "ensure.list" +local e = require "ensure.engine" local loud = { identifier = l.default.identifier, invalid = function (_, name) io.stderr:write(string.format("invalid package name: %q\n", name)) end, } -local p = l.all(arg[1] or os.getenv("ENSURE") or "/etc/ensure.d", loud) -for _, name in pairs(p) do - print(name) -end +local path = arg[1] or os.getenv("ENSURE") or "/etc/ensure.d" +e.install(e.check(l.all(path, loud))) -- cgit v1.1