]> git.draconx.ca Git - dxcommon.git/blobdiff - scripts/gen-options.awk
gen-options.awk: Fix generated help text under mawk.
[dxcommon.git] / scripts / gen-options.awk
index 679dc9904c4770fbcbec5f6d32dc991a42237ef4..f1dbb1cb2088c135ac00275c4dc7f5de3a648862 100755 (executable)
@@ -213,7 +213,9 @@ lopt {
   sub(/^[ \t]*/, "")
   if (!$0) { next }
 
-  optionhelp[lopt] = (lopt in optionhelp ? optionhelp[lopt] "\n" : "") $0
+  if (lopt in optionhelp)
+    $0 = "\n" $0;
+  optionhelp[lopt] = optionhelp[lopt] $0;
 }
 
 # Exit immediately on error