tup-ext: add getconfig helper

This commit is contained in:
Christopher Monsanto 2020-05-01 02:45:27 -04:00
parent 037f276760
commit eb5bde52dd

View File

@ -21,6 +21,16 @@ function iglob(pats)
return iter(glob(pats))
end
-- getconfig returning an empty string on absence is inconvenient
function getconfig(str)
local v = tup.getconfig(str)
if v == "" then
return nil
else
return v
end
end
function symlink(input, output)
-- The path must be relative from output, walk back to the root
local prefix = ""