#!/usr/bin/env lua local lapp = require "pl.lapp" local dir = require "pl.dir" local path = require "pl.path" local pretty = require "pl.pretty" local srcinfo = require "srcinfo" local args = lapp [[ Finds dependencies from .SRCINFO files and lists them in buildable stages. Usage: depstage [-h] [] -h, --help Display this help message and exit. (default '.') Optional path to directory to start recursive transversal from. ]] for root, dirs, files in dir.walk(args.pathname) do for _, file in pairs(files) do if file == ".SRCINFO" then local pathname = path.normpath(path.join(root, file)) local handle = io.open(pathname) io.write(pathname, " ") pretty.dump(srcinfo(handle)) print() -- From this, find {,make,check}depends and group packages into stages. end end end