aboutsummaryrefslogtreecommitdiff
path: root/doc/gen-man.sh
Commit message (Collapse)AuthorAgeFilesLines
* doc/gen-man.sh: use printf instead of echo to make it portableCarlos Henrique Lima Melara2023-06-101-3/+3
| | | | | | printf is recommended instead of echo because it has a more predictable behavior than echo (tip from the POSIX standard ;-). Using it allow us to generate the _same_ manpage using sh, dash or bash.
* doc: remove unused DATE logic from gen-man.shCarlos Henrique Lima Melara2023-06-051-4/+0
| | | | | The use of $DATE was removed in 7a5499d7, but I forgot to remove this logic from gen-man.sh.
* doc: double escape special characters (\f) in gen-man.shCarlos Henrique Lima Melara2023-06-051-2/+2
| | | | | | sh and, consequently, dash interpret some escaped characters as control sequences, so an echo '\f' outputs a form feed. To avoid this problem in manpage generation, we have to escape "\f" sequences.
* doc/gen-man.sh: make sed command portablelinear2021-09-051-1/+1
| | | | | | | | | | | | | | | | | | | | | usage of the "-i" feature of sed is not entirely portable across different operating systems. -i has an optional extension to save a backup of the edited file, and different systems parse this option in a different manner. the sed in GNU, busybox, NetBSD, and OpenBSD expects the argument to be immediately after, like `-i.bak`, if it is present. the sed in macOS and FreeBSD expects the argument to follow after a space, like `-i .bak`, but will accept the `-i.bak` form as well. the issue is that when no backup is specified, the first requires just `-i`, where the second requires `-i ''`. the easiest way around this is to just add a backup, which is what i chose to do here. i also added the .bak extension to the .gitignore. additionally, all aforementioned seds except for GNU require the file to be the final argument, and will not accept it between other options.
* doc/gen-man.sh: head and tail +/- syntax is not portablelinear2021-09-051-2/+1
| | | | | | | | the + and - syntax on head and tail are only present, as far as i know, in GNU coreutils, and are not present on any other UNIX or BSD systems. this patch replaces those with a more portable processing chain, which is tested to work on GNU coreutils, NetBSD, macOS, and busybox.
* don't depend on bashomni2021-04-031-11/+11
|
* man: fix dateMike Skec2021-03-151-1/+1
| | | | The month in the date was set to the 'minute' that the help file was last modified
* help.gemini: add spaces after headersMike Skec2021-03-021-2/+2
| | | | It seems common in gemtext to have a line of spacing after headings. helps with readability a bit
* Add awk script for gemtext to man conversionMike Skec2021-03-021-95/+44
|
* Man page generation script addedMike Skec2021-03-021-0/+122
Not yet added to make target. ^Cy also need some improving.