summaryrefslogtreecommitdiffabout
path: root/tools/enflesh_filters_list.sh
authorMichael Krelin <hacker@klever.net>2006-08-11 16:01:56 (UTC)
committer Michael Krelin <hacker@klever.net>2006-08-11 16:01:56 (UTC)
commit0c21a7a0d5b84dc6726462f0fbe51b8c32433262 (patch) (side-by-side diff)
tree9df6334cb1a61efebe68f7bcef9aa119a823626a /tools/enflesh_filters_list.sh
parent9bcc235e575a95989a5903394c127accbeef2e0f (diff)
downloadmidillo-0c21a7a0d5b84dc6726462f0fbe51b8c32433262.zip
midillo-0c21a7a0d5b84dc6726462f0fbe51b8c32433262.tar.gz
midillo-0c21a7a0d5b84dc6726462f0fbe51b8c32433262.tar.bz2
initial commit into repository0.0
Diffstat (limited to 'tools/enflesh_filters_list.sh') (more/less context) (ignore whitespace changes)
-rw-r--r--tools/enflesh_filters_list.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/tools/enflesh_filters_list.sh b/tools/enflesh_filters_list.sh
new file mode 100644
index 0000000..f1d8dfc
--- a/dev/null
+++ b/tools/enflesh_filters_list.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+srcfile="${1}"
+enumfile="${2}"
+deffile="${3}"
+IFS=':'
+exec 5>${enumfile}
+exec 6>${deffile}
+SEQN=0
+LN=0
+cat ${srcfile} \
+ | while read id ids help ; do
+ LN="`expr ${LN} + 1`"
+ test -z "${id}" && continue
+ test "${id}" != "${id# }" && continue
+ echo "#line ${LN} \"${srcfile}\"" >&5
+ echo " filter_${id} = ${SEQN}," >&5
+ echo "#line ${LN} \"${srcfile}\"" >&6
+ echo ' { { "'$(echo $ids|sed -e 's-/-", "-g')'", 0 }, "'"${help}"'", false },' >&6
+ SEQN="`expr ${SEQN} + 1`"
+ done