Permalink
Browse files
mergeSupport recursive blocks
- Loading branch information...
Showing
with
11 additions
and
26 deletions.
-
+11
−26
bacula.aug
|
@@ -42,10 +42,10 @@ module Bacula = |
|
|
let line (sto:lens) = [ sto . comment_or_eol ]
|
|
|
let line_noeol (sto:lens) = [ sto . comment_or_semicolon ]
|
|
|
|
|
|
- let block =
|
|
|
- let entry = Util.empty | (indent . (line keyvalue|line include))
|
|
|
- in let entry_noindent = line keyvalue | line include
|
|
|
- in let entry_noindent_noeol = line_noeol keyvalue | line_noeol include
|
|
|
+ let rec block =
|
|
|
+ let entry = Util.empty | (indent . (line keyvalue|line include|block))
|
|
|
+ in let entry_noindent = line keyvalue | line include | block
|
|
|
+ in let entry_noindent_noeol = line_noeol keyvalue | line_noeol include | block
|
|
|
in let entry_noeol = indent . entry_noindent_noeol
|
|
|
in [ label "@block" . store /[a-zA-Z]+/
|
|
|
. Build.block_generic
|
|
@@ -164,26 +164,11 @@ module Bacula = |
|
|
{ "@block" = "Storage"
|
|
|
{ "Name" = "kaki-sd" }
|
|
|
}
|
|
|
-
|
|
|
- (* recursive directives *)
|
|
|
- test Bacula.lns get "FileSet {
|
|
|
- Name = \"DefaultSet\"
|
|
|
- Include {
|
|
|
- Options {
|
|
|
- signature = SHA1
|
|
|
- noatime = yes
|
|
|
- }
|
|
|
- File = /etc
|
|
|
- }
|
|
|
-}" =
|
|
|
- {"FileSet"
|
|
|
- {"Name" = "DefaultSet"}
|
|
|
- {"Include"
|
|
|
- {"Options"
|
|
|
- {"signature" = "SHA1"}
|
|
|
- {"noatime" = "yes"}
|
|
|
- }
|
|
|
- {"File" = "/etc"}
|
|
|
- }
|
|
|
- }
|
|
|
|
|
|
+ (* recursive directives *)
|
|
|
+ test Bacula.lns get "FileSet { Include { signature = SHA1 } }" =
|
|
|
+ { "@block" = "FileSet"
|
|
|
+ { "@block" = "Include"
|
|
|
+ { "signature" = "SHA1" }
|
|
|
+ }
|
|
|
+ }
|
0 comments on commit
9ca1843