3 Parsing /etc/apt/sources.list
9 (************************************************************************
10 * Group: Utility variables/functions
11 ************************************************************************)
13 let sep_ws = del /[ \t]+/ " "
16 let eol = Util.del_str "\n"
19 let comment = Util.comment
21 let empty = Util.empty
24 let word = /[^# \n\t]+/
26 (************************************************************************
28 ************************************************************************)
30 let record = [ Util.indent . seq "source" . [ label "type" . store word ] . sep_ws .
31 [ label "uri" . store word ] . sep_ws .
32 [ label "distribution" . store word ] .
33 [ label "component" . sep_ws . store word ]* .
37 (************************************************************************
39 ************************************************************************)
41 let lns = ( comment | empty | record ) *
44 let filter = (incl "/etc/apt/sources.list")
45 . (incl "/etc/apt/sources.list.d/*")
48 let xfm = transform lns filter
50 (* Local Variables: *)