Add hints on how to add and sort man-ref entries.

Sponsored by:	Absolight
This commit is contained in:
Mathieu Arnold 2016-11-08 17:48:47 +00:00
parent 319a4e1123
commit 503104cd0c
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=49651
2 changed files with 11 additions and 0 deletions

View file

@ -21,6 +21,9 @@
lexicographical order by the entity (i.e., the dots used in place of lexicographical order by the entity (i.e., the dots used in place of
special characters should not be expanded when comparing). special characters should not be expanded when comparing).
This can be used to sort a section:
sed -E 's,.*refentrytitle>(.*)</refentrytit.*,\1 &,' | env LANG=C sort -u -k 1,1 | sed -Ee 's,[^ ]* [^ ]* ,,'
$FreeBSD$ $FreeBSD$
--> -->

View file

@ -1,5 +1,13 @@
#!/usr/bin/perl -w #!/usr/bin/perl -w
# $FreeBSD$ # $FreeBSD$
#
# To get the entities sorted the same way as the current man-refs.ent file is, this command can be used:
#
# find -s /usr/share/man/ -name '*.gz' | \
# sed -Ee 's,.*([[:digit:]])/(.*)\.[^.]+\.gz,\1 \2 &,' | \
# env LANG=C sort -k 1,1n -k 2,2 | \
# sed -e 's/.* //' | \
# perl share/xml/man-refs.pl
use strict; use strict;