bliss

KISS in Lua
git clone git://bvnf.space/bliss.git
Log | Files | Refs | README | LICENSE

commit 23d03d4f9a8f7b0f2f18dd3d10db65d020216a75
parent bcdbf6e9ebc20cc9072619d9f303cb3298ce4921
Author: phoebos <ben@bvnf.space>
Date:   Fri, 30 Jun 2023 02:20:38 +0100

add pkg.isinstalled

Diffstat:
Mbliss/pkg.lua | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/bliss/pkg.lua b/bliss/pkg.lua @@ -26,6 +26,11 @@ local function find(name, path) utils.die("'"..name.."' not found") end +local function isinstalled(env, name) + local sb = sys_stat.stat(env.sys_db .. "/" .. name) + return not not sb +end + local function find_version(pkg, repo_dir) local v = repo_dir .. "/version" @@ -131,6 +136,7 @@ end local M = { find = find, + isinstalled = isinstalled, find_version = find_version, find_checksums = find_checksums, find_depends = find_depends,