mvertes / txt2man

txt2man converts text to man page
GNU General Public License v2.0
57 stars 9 forks source link

Fix usage of the date command on BSD systems #20

Closed ismaell closed 4 years ago

ismaell commented 5 years ago

BSD and GNU implementations of the date command are slightly incompatible.

The GNU implementation can take an arbitrary date with the -d option, and the format is automatically detected, but on BSD implementations it must be invoked like for setting the system date but using the -j option to avoid that step, and the input format must be provided with the -f option.

Since the -j option isn't supported by the GNU implementation, it can be exploited to detect which variant the system uses.

Closes: https://github.com/mvertes/txt2man/issues/19

Signed-off-by: Ismael Luceno ismael@iodev.co.uk