Ticket #1786: compressdoc-man_db-2.patch
File compressdoc-man_db-2.patch, 3.0 KB (added by , 19 years ago) |
---|
-
TabularUnified compressdoc
old new 20 20 # Modified 20050112 by Randy McMurchy to shorten line lengths and 21 21 # correct grammar errors. 22 22 # 23 # Modified 20060128 by Alexander E. Patrakov for compatibility with Man-DB 24 # 25 # Modified 20060311 by Archaic to use Man-DB manpath utility which is a 26 # replacement for man --path from Man. 27 # 23 28 # TODO: 24 29 # - choose a default compress method to be based on the available 25 30 # tool : gzip or bzip2; … … 74 79 backup mode. 75 80 76 81 --conf=dir, --conf dir 77 Specify the location of man .conf. Defaults to /etc.82 Specify the location of man_db.conf. Defaults to /etc. 78 83 79 84 --verbose, -v Verbose mode, print the name of the directory being 80 85 processed. Double the flag to turn it even more verbose, 81 86 and to print the name of the file being processed. 82 87 83 --fake, -f Fakes it. Print the actual parameters comp manwill use.88 --fake, -f Fakes it. Print the actual parameters compressdoc will use. 84 89 85 90 dirs A list of space-separated _absolute_ pathnames to the 86 man directories. When empty, and only then, parse 87 ${MAN_CONF}/man.conf for all occurrences of MANPATH. 91 man directories. When empty, and only then, use manpath 92 to parse ${MAN_CONF}/man_db.conf for all valid occurrences 93 of MANDATORY_MANPATH. 88 94 89 95 Note about compression: 90 96 There has been a discussion on blfs-support about compression ratios of … … 149 155 150 156 # OK, parse the command-line for arguments, and initialize to some 151 157 # sensible state, that is: don't change links state, parse 152 # /etc/man .conf, be most silent, search man.conf in /etc, and don't158 # /etc/man_db.conf, be most silent, search man_db.conf in /etc, and don't 153 159 # force (re-)compression. 154 160 COMP_METHOD= 155 161 COMP_SUF= … … 259 265 # Note: on my machine, 'man --path' gives /usr/share/man twice, once 260 266 # with a trailing '/', once without. 261 267 if [ -z "$MAN_DIR" ]; then 262 MAN_DIR=`man --path -C "$MAN_CONF"/man.conf \268 MAN_DIR=`manpath -C "$MAN_CONF"/man_db.conf \ 263 269 | sed 's/:/\\n/g' \ 264 270 | while read foo; do dirname "$foo"/.; done \ 265 271 | sort -u \ 266 272 | while read bar; do echo -n "$bar "; done` 267 273 fi 268 274 269 # If no MAN PATH in ${MAN_CONF}/man.conf, abort as well275 # If no MANDATORY_MANPATH in ${MAN_CONF}/man_db.conf, abort as well 270 276 if [ -z "$MAN_DIR" ]; then 271 echo "No directory specified, and no directory found with \`man --path'"277 echo "No directory specified, and no directory found with \`manpath'" 272 278 exit 1 273 279 fi 274 280 … … 287 293 echo "Compression suffix: $COMP_SUF" 288 294 echo -n "Force compression.: " 289 295 [ "foo$FORCE_OPT" = "foo-F" ] && echo "yes" || echo "no" 290 echo "man .conf is.......: ${MAN_CONF}/man.conf"296 echo "man_db.conf is....: ${MAN_CONF}/man_db.conf" 291 297 echo -n "Hard-links........: " 292 298 [ "foo$LN_OPT" = "foo-S" ] && 293 299 echo "convert to soft-links" || echo "leave as is"