2011-10-20 20:29:30 +02:00
|
|
|
#
|
|
|
|
# Parse zodiac config
|
|
|
|
#
|
|
|
|
|
|
|
|
action == "config" && (NF == 0 || /^;/) {
|
|
|
|
next
|
|
|
|
}
|
|
|
|
|
2011-10-24 05:15:46 +02:00
|
|
|
action == "config" && match($0, /\[([[:alnum:]_]).*\]/) {
|
2011-10-20 20:29:30 +02:00
|
|
|
section = substr($0, (RSTART + 1), (RLENGTH - 2))
|
|
|
|
next
|
|
|
|
}
|
|
|
|
|
|
|
|
action == "config" && section == "parse" {
|
|
|
|
n = split($0, exts, ",")
|
|
|
|
for (i in exts) {
|
|
|
|
ext = exts[i]
|
|
|
|
gsub(/ /, "", ext)
|
|
|
|
filter[ext] = "none"
|
|
|
|
}
|
|
|
|
next
|
|
|
|
}
|
|
|
|
|
|
|
|
action == "config" && section == "parse_convert" && (NF > 1) {
|
|
|
|
ext_list = $1
|
2011-10-24 05:15:46 +02:00
|
|
|
cmd = substr($0, length(ext_list) + 1)
|
2011-10-20 20:29:30 +02:00
|
|
|
n = split(ext_list, exts, ",")
|
|
|
|
for (i in exts) {
|
|
|
|
ext = exts[i]
|
|
|
|
gsub(/ /, "", ext)
|
|
|
|
filter[ext] = cmd
|
2011-10-24 05:15:46 +02:00
|
|
|
print cmd >> "awk.log"
|
2011-10-20 20:29:30 +02:00
|
|
|
}
|
|
|
|
next
|
|
|
|
}
|
|
|
|
|
|
|
|
action == "config" && section == "ignore" {
|
|
|
|
ignore[ignore_count++] = $0
|
|
|
|
}
|