Lines Matching full:local
10 local sys_wait = require("posix.sys.wait")
11 local unistd = require("posix.unistd")
13 local all_libcompats <const> = "%%_ALL_libcompats%%"
18 local function capture(command)
19 local p = io.popen(command)
20 local output = p:read("*a")
26 local function append_list(list, other)
34 local function read_all(fd)
35 local ret = ""
37 local buffer = assert(unistd.read(fd, 1024))
45 local function bsddialog(args)
46 local r, w = assert(unistd.pipe())
48 local pid = assert(unistd.fork())
57 local output = read_all(r)
60 local _, _, exit_code = assert(sys_wait.wait(pid))
66 local function prompt_yn(question)
67 local exit_code = bsddialog({
78 local function select_components(components, options)
79 local descriptions = {
94 local defaults = {
106 local sorted_components = {}
109 local show_component = function (component)
160 local checklist_items = {}
162 local description = descriptions[component] or ""
163 local default = defaults[component] or "off"
169 local bsddialog_args = {
183 local exit_code, output = bsddialog(bsddialog_args)
194 local selected = {}
220 local function select_packages(pkg, options)
223 local components = {
231 local kernel_packages = {
239 local rquery = capture(pkg .. "rquery -U -r FreeBSD-base %n")
241 local setname = package:match("^FreeBSD%-set%-(.+)$")
264 local selected = select_components(components, options)
267 local debug = false
275 local packages = {}
277 local pkglist = components[component]
285 local setname = c:match("^FreeBSD%-set%-(.*)$")
287 local dbgset = setname.."-dbg"
298 local function parse_options()
299 local options = {}
313 local function pkgbase()
314 local options = parse_options()
323 local chroot = assert(os.getenv("BSDINSTALL_CHROOT"))
329 local chroot_repos_dir = chroot .. "/usr/local/etc/pkg/repos/"
334 local repos_dir = os.getenv("BSDINSTALL_PKG_REPOS_DIR")
346 local pkg = "pkg --rootdir " .. chroot ..
355 local packages = table.concat(select_packages(pkg, options), " ")