Changeset 9545a987


Ignore:
Timestamp:
03/18/2006 06:15:56 PM (18 years ago)
Author:
Dan Nichilson <dnicholson@…>
Branches:
10.0, 10.1, 11.0, 11.1, 11.2, 11.3, 12.0, 12.1, 6.2, 6.2.0, 6.2.0-rc1, 6.2.0-rc2, 6.3, 6.3-rc1, 6.3-rc2, 6.3-rc3, 7.10, 7.4, 7.5, 7.6, 7.6-blfs, 7.6-systemd, 7.7, 7.8, 7.9, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, basic, bdubbs/svn, elogind, gnome, kde5-13430, kde5-14269, kde5-14686, kea, ken/TL2024, ken/inkscape-core-mods, ken/tuningfonts, krejzi/svn, lazarus, lxqt, nosym, perl-modules, plabs/newcss, plabs/python-mods, python3.11, qt5new, rahul/power-profiles-daemon, renodr/vulkan-addition, systemd-11177, systemd-13485, trunk, upgradedb, xry111/intltool, xry111/llvm18, xry111/soup3, xry111/test-20220226, xry111/xf86-video-removal
Children:
e5254ec
Parents:
74bafa2c
Message:

Compressdoc adapted to Man-DB

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@5735 af4574ff-66df-0310-9fd7-8a98e5e911e0

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • general.ent

    r74bafa2c r9545a987  
    1 <!ENTITY day          "16">                   <!-- Always 2 digits -->
     1<!ENTITY day          "18">                   <!-- Always 2 digits -->
    22<!ENTITY month        "03">                   <!-- Always 2 digits -->
    33<!ENTITY year         "2006">
  • introduction/welcome/changelog.xml

    r74bafa2c r9545a987  
    4343
    4444    <listitem>
     45      <para>March 18th, 2006</para>
     46      <itemizedlist>
     47        <listitem>
     48          <para>[dnicholson] - Updated compressdoc script to use Man-DB.</para>
     49        </listitem>
     50      </itemizedlist>
     51    </listitem>
     52
     53    <listitem>
    4554      <para>March 16th, 2006</para>
    4655      <itemizedlist>
  • postlfs/config/compressdoc.xml

    r74bafa2c r9545a987  
    2222  <para>Man and info reader programs can transparently process files compressed
    2323  with <command>gzip</command> or <command>bzip2</command>, a feature you can
    24   use to free some disk space while keeping
    25   your documentation available. However, things are not that simple; man
    26   directories tend to contain links&mdash;hard and symbolic&mdash;which defeat
    27   simple ideas like recursively calling <command>gzip</command> on them. A
    28   better way to go is to use the script below.</para>
     24  use to free some disk space while keeping your documentation
     25  available. However, things are not that simple; man directories tend to
     26  contain links&mdash;hard and symbolic&mdash;which defeat simple ideas like
     27  recursively calling <command>gzip</command> on them. A better way to go is
     28  to use the script below. If you would prefer to download the file instead of
     29  creating it by typing or cut-and-pasting, you can find it at
     30  <ulink url="&files-anduin;/compressdoc"/> (the file should be installed in
     31  the <filename class="directory">/usr/sbin</filename> directory).</para>
    2932
    3033<screen role="root"><userinput>cat &gt; /usr/sbin/compressdoc &lt;&lt; "EOF"
    3134<literal>#!/bin/bash
    32 # VERSION: 20050112.0027
     35# VERSION: 20060311.0028
    3336#
    3437# Compress (with bzip2 or gzip) all man pages in a hierarchy and
     
    5053# Modified 20050112 by Randy McMurchy to shorten line lengths and
    5154# correct grammar errors.
     55#
     56# Modified 20060128 by Alexander E. Patrakov for compatibility with Man-DB.
     57#
     58# Modified 20060311 by Archaic to use Man-DB manpath utility which is a
     59# replacement for man --path from Man.
    5260#
    5361# TODO:
     
    105113
    106114  --conf=dir, --conf dir
    107                 Specify the location of man.conf. Defaults to /etc.
     115                Specify the location of man_db.conf. Defaults to /etc.
    108116
    109117  --verbose, -v Verbose mode, print the name of the directory being
     
    111119                and to print the name of the file being processed.
    112120
    113   --fake, -f    Fakes it. Print the actual parameters compman will use.
     121  --fake, -f    Fakes it. Print the actual parameters compressdoc will use.
    114122
    115123  dirs          A list of space-separated _absolute_ pathnames to the
    116                 man directories. When empty, and only then, parse
    117                 ${MAN_CONF}/man.conf for all occurrences of MANPATH.
     124                man directories. When empty, and only then, use manpath
     125                to parse ${MAN_CONF}/man_db.conf for all valid occurrences
     126                of MANDATORY_MANPATH.
    118127
    119128Note about compression:
     
    180189# OK, parse the command-line for arguments, and initialize to some
    181190# sensible state, that is: don't change links state, parse
    182 # /etc/man.conf, be most silent, search man.conf in /etc, and don't
     191# /etc/man_db.conf, be most silent, search man_db.conf in /etc, and don't
    183192# force (re-)compression.
    184193COMP_METHOD=
     
    290299# with a trailing '/', once without.
    291300if [ -z "$MAN_DIR" ]; then
    292   MAN_DIR=`man --path -C "$MAN_CONF"/man.conf \
     301  MAN_DIR=`manpath -C "$MAN_CONF"/man_db.conf \
    293302            | sed 's/:/\\n/g' \
    294303            | while read foo; do dirname "$foo"/.; done \
     
    297306fi
    298307
    299 # If no MANPATH in ${MAN_CONF}/man.conf, abort as well
     308# If no MANDATORY_MANPATH in ${MAN_CONF}/man_db.conf, abort as well
    300309if [ -z "$MAN_DIR" ]; then
    301   echo "No directory specified, and no directory found with \`man --path'"
     310  echo "No directory specified, and no directory found with \`manpath'"
    302311  exit 1
    303312fi
     
    318327  echo -n "Force compression.: "
    319328  [ "foo$FORCE_OPT" = "foo-F" ] &amp;&amp; echo "yes" || echo "no"
    320   echo "man.conf is.......: ${MAN_CONF}/man.conf"
     329  echo "man_db.conf is....: ${MAN_CONF}/man_db.conf"
    321330  echo -n "Hard-links........: "
    322331  [ "foo$LN_OPT" = "foo-S" ] &amp;&amp;
     
    495504done # for DIR</literal>
    496505
    497 EOF
    498 chmod 755 /usr/sbin/compressdoc</userinput></screen>
     506EOF</userinput></screen>
     507
     508  <para>As <systemitem class="username">root</systemitem>, make
     509  <command>compressdoc</command> executable for all users:</para>
     510
     511<screen><userinput>chmod -v 755 /usr/sbin/compressdoc</userinput></screen>
    499512
    500513  <para>Now, as <systemitem class="username">root</systemitem>, you can issue
     
    503516  comprehensive help about what the script is able to do.</para>
    504517
    505   <para> Don't forget that a few programs, like the <application>X Window
     518  <para>Don't forget that a few programs, like the <application>X Window
    506519  System</application> and <application>XEmacs</application> also
    507520  install their documentation in non-standard places (such as
    508521  <filename class="directory">/usr/X11R6/man</filename>, etc.). Be sure
    509   to add these locations to the file <filename>/etc/man.conf</filename>, as
    510   <envar>MANPATH</envar> <replaceable>[/path]</replaceable> lines.</para>
    511 
    512   <para> Example:</para>
     522  to add these locations to the file <filename>/etc/man_db.conf</filename>, as
     523  <envar>MANDATORY_MANPATH</envar> <replaceable>[/path]</replaceable>
     524  lines.</para>
     525
     526  <para>Example:</para>
    513527
    514528<screen><literal>    ...
    515     MANPATH /usr/share/man
    516     MANPATH /usr/local/man
    517     MANPATH /usr/X11R6/man
    518     MANPATH /opt/qt/doc/man
     529    MANDATORY_MANPATH                      /usr/share/man
     530    MANDATORY_MANPATH                       /usr/X11R6/man
     531    MANDATORY_MANPATH                       /usr/local/man
     532    MANDATORY_MANPATH                      /opt/qt/doc/man
    519533    ...</literal></screen>
    520534
Note: See TracChangeset for help on using the changeset viewer.