bob 0.9.0

A pkgsrc package builder
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
--
-- Read pkgpaths from a file, one per line.  Blank lines and comments
-- starting with # are ignored.  Inline comments are supported.
--
function read_pkgpaths(file)
    local paths = {}
    for line in io.lines(file) do
        local path = line:match("^%s*([^#%s]+)")
        if path and path:match("^[^/]+/[^/]+$") then
            table.insert(paths, path)
        end
    end
    return paths
end