template.awk fix processing of certain config file formats

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@5249 3c298f89-4303-0410-b956-a3cf2f4a3e73
master
Felix Fietkau 2006-10-20 12:56:42 +00:00
parent 238f6ba366
commit af117006ba
1 changed files with 3 additions and 3 deletions

View File

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