Use sections from config files rather than hardcoding. http://bugs.gentoo.org/86863 --- src/makewhatis.sh +++ src/makewhatis.sh @@ -92,7 +92,15 @@ defmanpath=$DEFMANPATH defcatpath= -sections="1 2 3 4 5 6 7 8 9 n l" +if [ -n "$MANSECT" ]; then + sections=$MANSECT +else + sections=`$AWK '($1 == "MANSECT") { print $2 }' /etc/man.conf` + if [ x"$sections" = x ]; then + sections="1 2 3 4 5 6 7 8 9 n l" + fi +fi +sections=`echo $sections | sed -e 's/:/ /g'` for name in "$@" do