aboutsummaryrefslogtreecommitdiff
path: root/mkusage.pl
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2025-05-06 04:10:06 -0400
committerB. Watson <urchlay@slackware.uk>2025-05-06 04:10:06 -0400
commit67ebbac0be7ad917e794ca5ea0496d0a1ead83b8 (patch)
treed169b8481afe91a394023c294741a21e57cb033f /mkusage.pl
parentc4eda00ddbc16723f3e1d1e943edaaa2c6c2c748 (diff)
downloadmarsond-67ebbac0be7ad917e794ca5ea0496d0a1ead83b8.tar.gz
much work (options, rc script, make install, etc etc).
Diffstat (limited to 'mkusage.pl')
-rw-r--r--mkusage.pl18
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";