From 55419a0dde74ee8ef2306a7893188d3d8855b972 Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Sat, 5 Nov 2016 12:25:52 -0500 Subject: use the new mlinks tool to generate man links --- man/update_links.sh | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/man/update_links.sh b/man/update_links.sh index 3bccd0c..04a8694 100755 --- a/man/update_links.sh +++ b/man/update_links.sh @@ -1,18 +1,19 @@ #!/bin/sh # Run this periodically to ensure that the manpage links are up to date +( + cd /usr/src/usr.bin/mandoc/ + make obj + make cleandir + make depend + make + cd /usr/src/regress/usr.bin/mandoc/db/mlinks/ + make obj + make cleandir + make +) + +makewhatis -a . echo "# This is an auto-generated file by $0" > links -doas makewhatis -for i in `ls -1 *.3`; do - name=`echo $i|cut -d. -f1` - links=`sqlite3 /usr/share/man/mandoc.db \ - "select names.name from mlinks,names where mlinks.name='$name' and mlinks.pageid=names.pageid;"` - for j in $links; do - a=`echo "x$j" | tr '[:upper:]' '[:lower:]'` - b=`echo "x$name" | tr '[:upper:]' '[:lower:]'` - if [[ $a != $b && $a != *""* ]]; then - echo $name.3,$j.3 >> links - fi - done -done +/usr/src/regress/usr.bin/mandoc/db/mlinks/obj/mlinks mandoc.db | sort >> links -- cgit v1.2.3-55-g6feb