template.awk fix processing of certain config file formats

SVN-Revision: 5249
This commit is contained in:
Felix Fietkau 2006-10-20 12:56:42 +00:00
parent ff9c3172bf
commit dbd8cee5e7

View File

@ -27,11 +27,11 @@ $1 == "@else" {
else noprint = 1
}
($1 !~ /^@[a-zA-Z]/) && (noprint != 1) {
($1 !~ /^@[a-zA-Z0-9_]/) && (noprint != 1) {
n=split(line "@@", a, /@@/)
for (i=1; i<=n; i++) {
if ((i % 2) == 1) printf a[i]
else printf v[a[i]]
if ((i % 2) == 1) printf "%s" a[i]
else printf "%s" v[a[i]]
}
print ""
}