]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
inline-source: gawk doesn't have boolean constants.
authorGary V. Vaughan <gary@gnu.org>
Fri, 3 Jan 2014 07:07:48 +0000 (20:07 +1300)
committerGary V. Vaughan <gary@gnu.org>
Fri, 3 Jan 2014 07:07:48 +0000 (20:07 +1300)
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>
gl/build-aux/inline-source

index 54cce3373ad2150bcf4acd87ca0c381e3502f4ef..1e4772c7fccc5296368007bcee8bd655e4f6b854 100755 (executable)
@@ -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;
         }