From: Gary V. Vaughan Date: Fri, 3 Jan 2014 07:07:48 +0000 (+1300) Subject: inline-source: gawk doesn't have boolean constants. X-Git-Tag: v2.4.3~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=da59d47a448f0a623c7f56632dbe8c3f864a450a;p=thirdparty%2Flibtool.git inline-source: gawk doesn't have boolean constants. 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 --- diff --git a/gl/build-aux/inline-source b/gl/build-aux/inline-source index 54cce3373..1e4772c7f 100755 --- a/gl/build-aux/inline-source +++ b/gl/build-aux/inline-source @@ -124,13 +124,13 @@ func_include () 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; }