I've been writing a lot of Lua lately, but still a silly mistake:(
* gl/build-aux/inline-source (func_include): Use `magic` variable
to count #! lines found, and only output the DO NOT EDIT warning
after the first one.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
test -n "$_G_scriptdir" || _G_scriptdir="./"
$AWK '
- BEGIN { domagic = true; }
+ BEGIN { magic = 0; }
- /^#!/ && domagic == true {
+ /^#!/ && magic == 0 {
print $0;
print "## DO NOT EDIT - This file generated from '$1'";
print "## by '$progname' v'$scriptversion'";
- domagic = false;
+ magic++;
next;
}