X-Git-Url: https://git.draconx.ca/gitweb/dxcommon.git/blobdiff_plain/da99716d86d4870be554d8412b41a751583da661..e0eee379d3bce3e3629175d4a214439da630c1ed:/scripts/gen-options.awk diff --git a/scripts/gen-options.awk b/scripts/gen-options.awk index f2cdfe7..98b7c17 100755 --- a/scripts/gen-options.awk +++ b/scripts/gen-options.awk @@ -213,11 +213,10 @@ $0 ~ /^-/ { } # Ignore any line beginning with a # -$0 ~ /^#/ { next } +$0 ~ /^#/ { next; } -lopt { - sub(/^[ \t]*/, "") - if (!$0) { next } +NF && lopt != "" { + sub(/^[ \t]*/, ""); if (lopt in optionhelp) $0 = "\n" $0;