1
0
Fork 0
mirror of synced 2024-11-04 09:08:56 -05:00

Merge pull request #303 from erijo/default-template-if

This commit is contained in:
Tim Byrne 2021-02-15 12:57:45 -06:00
commit d11e094f7b
No known key found for this signature in database
GPG key ID: 14DB4FC2465A4B12

4
yadm
View file

@ -411,13 +411,13 @@ function replace_vars() {
}
}
function conditions() {
pattern = ifs blank "*("
pattern = ifs blank "+("
for (label in c) {
value = c[label]
gsub(/[\\.^$(){}\[\]|*+?]/, "\\\\&", value)
pattern = sprintf("%syadm\\.%s" blank "*==" blank "*\"%s\"|", pattern, label, value)
}
sub(/\|$/,")",pattern)
sub(/\|$/, ")" blank "*%}$", pattern)
return pattern
}
EOF