diff options
author | B. Watson <urchlay@slackware.uk> | 2025-05-06 04:10:06 -0400 |
---|---|---|
committer | B. Watson <urchlay@slackware.uk> | 2025-05-06 04:10:06 -0400 |
commit | 67ebbac0be7ad917e794ca5ea0496d0a1ead83b8 (patch) | |
tree | d169b8481afe91a394023c294741a21e57cb033f /mkusage.pl | |
parent | c4eda00ddbc16723f3e1d1e943edaaa2c6c2c748 (diff) | |
download | marsond-67ebbac0be7ad917e794ca5ea0496d0a1ead83b8.tar.gz |
much work (options, rc script, make install, etc etc).
Diffstat (limited to 'mkusage.pl')
-rw-r--r-- | mkusage.pl | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/mkusage.pl b/mkusage.pl new file mode 100644 index 0000000..fab9626 --- /dev/null +++ b/mkusage.pl @@ -0,0 +1,18 @@ +#!/usr/bin/perl -w + +print "const char *helptext[] = {\n"; + +while(<>) { + chomp; + next if /^---/; + if(/^-[-a-zA-Z\d]/) { + $opt = $_; + next; + } + if($opt && (/^\.\. (.*)$/)) { + print "\t\" $opt: $1\",\n"; + undef $opt; + } +} + +print "\t(const char*)0\n};\n"; |