Ticket #1786: compressdoc-fix.patch
File compressdoc-fix.patch, 2.7 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 # 23 25 # TODO: 24 26 # - choose a default compress method to be based on the available 25 27 # tool : gzip or bzip2; … … 74 76 backup mode. 75 77 76 78 --conf=dir, --conf dir 77 Specify the location of man .conf. Defaults to /etc.79 Specify the location of man_db.conf. Defaults to /etc. 78 80 79 81 --verbose, -v Verbose mode, print the name of the directory being 80 82 processed. Double the flag to turn it even more verbose, … … 84 86 85 87 dirs A list of space-separated _absolute_ pathnames to the 86 88 man directories. When empty, and only then, parse 87 ${MAN_CONF}/man.conf for all occurrences of MANPATH. 89 ${MAN_CONF}/man_db.conf for all occurrences of 90 MANDATORY_MANPATH. 88 91 89 92 Note about compression: 90 93 There has been a discussion on blfs-support about compression ratios of … … 149 152 150 153 # OK, parse the command-line for arguments, and initialize to some 151 154 # sensible state, that is: don't change links state, parse 152 # /etc/man .conf, be most silent, search man.conf in /etc, and don't155 # /etc/man_db.conf, be most silent, search man_db.conf in /etc, and don't 153 156 # force (re-)compression. 154 157 COMP_METHOD= 155 158 COMP_SUF= … … 259 262 # Note: on my machine, 'man --path' gives /usr/share/man twice, once 260 263 # with a trailing '/', once without. 261 264 if [ -z "$MAN_DIR" ]; then 262 MAN_DIR=` man --path -C "$MAN_CONF"/man.conf\263 | sed 's/:/\\n/g'\265 MAN_DIR=`sed -n 's@^MANDATORY_MANPATH[^/]*\(/.*\)$@\1@ p' \ 266 "$MAN_CONF"/man_db.conf \ 264 267 | while read foo; do dirname "$foo"/.; done \ 265 268 | sort -u \ 266 269 | while read bar; do echo -n "$bar "; done` 267 270 fi 268 271 269 # If no MANPATH in ${MAN_CONF}/man .conf, abort as well272 # If no MANPATH in ${MAN_CONF}/man_db.conf, abort as well 270 273 if [ -z "$MAN_DIR" ]; then 271 echo "No directory specified, and no directory found with \`man --path'"274 echo "No directory specified, and no directory found in man_db.conf" 272 275 exit 1 273 276 fi 274 277 … … 287 290 echo "Compression suffix: $COMP_SUF" 288 291 echo -n "Force compression.: " 289 292 [ "foo$FORCE_OPT" = "foo-F" ] && echo "yes" || echo "no" 290 echo "man .conf is.......: ${MAN_CONF}/man.conf"293 echo "man_db.conf is.......: ${MAN_CONF}/man_db.conf" 291 294 echo -n "Hard-links........: " 292 295 [ "foo$LN_OPT" = "foo-S" ] && 293 296 echo "convert to soft-links" || echo "leave as is"