mirror of
https://github.com/smogon/sprites.git
synced 2026-07-13 06:31:33 -05:00
tup-ext: add getconfig helper
This commit is contained in:
parent
037f276760
commit
eb5bde52dd
|
|
@ -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 = ""
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user