change vman helper to automatically detect section

Given a filename like "foo.1" or "foo.fr.1", it is possible to calculate
the correct directory to install to, without requiring the user to
specify it.

Suggested-by: Christian Neukirchen <chneukirchen@gmail.com>
This commit is contained in:
Dominik Honnef 2014-07-04 16:15:00 +02:00
parent d59300a322
commit 94556b367f
2 changed files with 28 additions and 9 deletions

View file

@ -172,11 +172,14 @@ The optional 4th argument can be used to change the `file name`.
permissions 0755. The optional 2nd argument can be used to change
the `file name`.
- *vman()* `vman <file> <section> [<name>]`
- *vman()* `vman <file> [<name>]`
Installs `file` into usr/share/man/<section> in the pkg
`$DESTDIR`. The optional 3rd argument can be used to change the
`file name`.
Installs `file` as a man page. `vman()` parses the name and
determines the section as well as localization. Example mappings:
`foo.1` -> `${DESTDIR}/usr/share/man/man1/foo.1`
`foo.fr.1` -> `${DESTDIR}/usr/share/man/fr/man1/foo.1`
`foo.1p` -> `${DESTDIR}/usr/share/man/man1/foo.1p`
- *vdoc()* `vdoc <file> [<name>]`