On Thu, May 7, 2015 at 11:20 PM, Eric Sunshine [off-list ref] wrote:
quoted hunk ↗ jump to hunk
From: Eric Sunshine <redacted>
Subject: [PATCH] generate-cmdlist: parse common group commands
Signed-off-by: Eric Sunshine <redacted>
---
diff --git a/generate-cmdlist.awk b/generate-cmdlist.awk
new file mode 100644
index 0000000..19b36e5
--- /dev/null
+++ b/generate-cmdlist.awk
[...]
+state == 1 {
+ grp[$1] = ++n
+ sub($1"[ ][ ]*", "")
+ printf "\tN_(\"%s\"),\n", $0
+ next
By the way, this 'next' line can be deleted. It was leftover gunk from
an earlier iteration. It doesn't harm, but doesn't help either, and is
thus potentially confusing.
quoted hunk ↗ jump to hunk
+}
+/\[common\]/ {
+ state = 1
+}
+END { print "};" }