print modules in consistent (alphabetical) order
This commit is contained in:
parent
be044cb59e
commit
f7b507587d
1 changed files with 11 additions and 7 deletions
|
@ -72,13 +72,17 @@
|
||||||
(let [e (or (. modules path) [])]
|
(let [e (or (. modules path) [])]
|
||||||
(table.insert e option)
|
(table.insert e option)
|
||||||
(tset modules path e))))
|
(tset modules path e))))
|
||||||
(each [name module (pairs modules)]
|
(tset modules "lib/modules.nix" nil)
|
||||||
(print (or (read-preamble name) (headline name)))
|
(let [module-names (doto (icollect [n _ (pairs modules)] n) table.sort)]
|
||||||
(let [options (sort-options module)]
|
(io.stderr:write (view module-names))
|
||||||
(each [_ o (ipairs options)]
|
(each [_ name (ipairs module-names)]
|
||||||
(if (= o.type "parametrisable s6-rc service definition")
|
(let [module (. modules name)
|
||||||
(print-service o)
|
options (sort-options module)]
|
||||||
(print-option o))))))
|
(print (or (read-preamble name) (headline name)))
|
||||||
|
(each [_ o (ipairs options)]
|
||||||
|
(if (= o.type "parametrisable s6-rc service definition")
|
||||||
|
(print-service o)
|
||||||
|
(print-option o)))))))
|
||||||
|
|
||||||
;; for each element el, add to table modules keyed on
|
;; for each element el, add to table modules keyed on
|
||||||
;; el.declarations
|
;; el.declarations
|
||||||
|
|
Loading…
Reference in a new issue