Commit Graph

15 Commits

Author SHA1 Message Date
Carlos Henrique Lima Melara 4308819b9d doc/gen-man.sh: use printf instead of echo to make it portable
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.
2023-06-10 09:11:50 +02:00
Carlos Henrique Lima Melara b6c0259854 doc: remove unused DATE logic from gen-man.sh
The use of $DATE was removed in 7a5499d7, but I forgot to remove this
logic from gen-man.sh.
2023-06-05 08:29:26 +02:00
Carlos Henrique Lima Melara 9c60513b8d doc: double escape special characters (\f) in gen-man.sh
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.
2023-06-05 08:29:26 +02:00
Carlos Henrique Lima Melara 7a5499d7a2 Removes build date from manpage to make kristall builds reproducible 2022-01-30 16:55:41 +01:00
linear 2cdf23f692 doc/gen-man.sh: make sed command portable
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.
2021-09-05 11:04:54 +02:00
linear e07c8eb599 doc/gen-man.sh: head and tail +/- syntax is not portable
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.
2021-09-05 11:04:23 +02:00
omni 8d0eb55033 don't depend on bash 2021-04-03 10:47:53 +02:00
omni 5c59e94d94 make gem-to-man.awk portable 2021-04-03 10:47:29 +02:00
Mike Skec aab2b50efa man: fix date
The month in the date was set to the 'minute' that the help file was last modified
2021-03-15 10:38:53 +01:00
Mike Skec 547e7b1ad4 man: make mention of -w and -i options 2021-03-06 23:41:41 +01:00
Mike Skec 22759e719d help.gemini: add spaces after headers
It seems common in gemtext to have a line of spacing after headings. helps with readability a bit
2021-03-02 10:55:50 +01:00
Mike Skec 9084deb655 help.gemini: changes and additions 2021-03-02 10:55:50 +01:00
Mike Skec 7644e39d65 Add awk script for gemtext to man conversion 2021-03-02 10:55:50 +01:00
Mike Skec dd2d988757 help.gemini: slight wording changes more suitable for man page 2021-03-02 10:55:50 +01:00
Mike Skec 333332ac29 Man page generation script added
Not yet added to make target. ^Cy also need some improving.
2021-03-02 10:55:50 +01:00