Ignore:
Timestamp:
05/30/2005 09:56:30 PM (19 years ago)
Author:
Randy McMurchy <randy@…>
Branches:
10.0, 10.1, 11.0, 11.1, 11.2, 11.3, 12.0, 12.1, 6.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:
3aa07d1
Parents:
f009801
Message:

Removed excess spaces from the ends of lines in the source files

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • postlfs/config/compressdoc.xml

    rf009801 re0d33ef  
    2323  bzip2'ed pages, a feature you can use to free some disk space while keeping
    2424  your documentation available. However, things are not that simple; man
    25   directories tend to contain links&mdash;hard and symbolic&mdash;which defeat 
    26   simple ideas like recursively calling <command>gzip</command> on them. A 
     25  directories tend to contain links&mdash;hard and symbolic&mdash;which defeat
     26  simple ideas like recursively calling <command>gzip</command> on them. A
    2727  better way to go is to use the script below.</para>
    2828
     
    4343# to allow for a backup, to allow to keep the newest version of a page.
    4444#
    45 # Modified 20040330 by Tushar Teredesai to replace $0 by the name of the 
     45# Modified 20040330 by Tushar Teredesai to replace $0 by the name of the
    4646# script.
    4747#   (Note: It is assumed that the script is in the user's PATH)
     
    5353#     - choose a default compress method to be based on the available
    5454#       tool : gzip or bzip2;
    55 #     - offer an option to automagically choose the best compression 
    56 #       methed on a per page basis (eg. check which of 
     55#     - offer an option to automagically choose the best compression
     56#       methed on a per page basis (eg. check which of
    5757#       gzip/bzip2/whatever is the most effective, page per page);
    5858#     - when a MANPATH env var exists, use this instead of /etc/man.conf
     
    7878
    7979  --backup      Specify a .tar backup shall be done for all directories.
    80                 In case a backup already exists, it is saved as .tar.old 
    81                 prior to making the new backup. If a .tar.old backup 
     80                In case a backup already exists, it is saved as .tar.old
     81                prior to making the new backup. If a .tar.old backup
    8282                exists, it is removed prior to saving the backup.
    8383                In backup mode, no other action is performed.
     
    8585And where options are :
    8686  -1 to -9, --fast, --best
    87                 The compression level, as accepted by gzip and bzip2. 
    88                 When not specified, uses the default compression level 
    89                 for the given method (-6 for gzip, and -9 for bzip2). 
     87                The compression level, as accepted by gzip and bzip2.
     88                When not specified, uses the default compression level
     89                for the given method (-6 for gzip, and -9 for bzip2).
    9090                Not used when in backup or decompress modes.
    9191
    92   --force, -F   Force (re-)compression, even if the previous one was 
    93                 the same method. Useful when changing the compression 
    94                 ratio. By default, a page will not be re-compressed if 
    95                 it ends with the same suffix as the method adds 
     92  --force, -F   Force (re-)compression, even if the previous one was
     93                the same method. Useful when changing the compression
     94                ratio. By default, a page will not be re-compressed if
     95                it ends with the same suffix as the method adds
    9696                (.bz2 for bzip2, .gz for gzip).
    9797
    98   --soft, -S    Change hard-links into soft-links. Use with _caution_ 
    99                 as the first encountered file will be used as a 
     98  --soft, -S    Change hard-links into soft-links. Use with _caution_
     99                as the first encountered file will be used as a
    100100                reference. Not used when in backup mode.
    101101
    102   --hard, -H    Change soft-links into hard-links. Not used when in 
     102  --hard, -H    Change soft-links into hard-links. Not used when in
    103103                backup mode.
    104104
     
    106106                Specify the location of man.conf. Defaults to /etc.
    107107
    108   --verbose, -v Verbose mode, print the name of the directory being 
    109                 processed. Double the flag to turn it even more verbose, 
     108  --verbose, -v Verbose mode, print the name of the directory being
     109                processed. Double the flag to turn it even more verbose,
    110110                and to print the name of the file being processed.
    111111
    112112  --fake, -f    Fakes it. Print the actual parameters compman will use.
    113113
    114   dirs          A list of space-separated _absolute_ pathnames to the 
    115                 man directories. When empty, and only then, parse 
     114  dirs          A list of space-separated _absolute_ pathnames to the
     115                man directories. When empty, and only then, parse
    116116                ${MAN_CONF}/man.conf for all occurrences of MANPATH.
    117117
     
    120120  both gzip and bzip2 on man pages, taking into account the hosting fs,
    121121  the architecture, etc... On the overall, the conclusion was that gzip
    122   was much more efficient on 'small' files, and bzip2 on 'big' files, 
     122  was much more efficient on 'small' files, and bzip2 on 'big' files,
    123123  small and big being very dependent on the content of the files.
    124124
    125   See the original post from Mickael A. Peters, titled 
     125  See the original post from Mickael A. Peters, titled
    126126  "Bootable Utility CD", dated 20030409.1816(+0200), and subsequent posts:
    127127  http://linuxfromscratch.org/pipermail/blfs-support/2003-April/038817.html
    128128
    129   On my system (x86, ext3), man pages were 35564KB before compression. 
    130   gzip -9 compressed them down to 20372KB (57.28%), bzip2 -9 got down to 
     129  On my system (x86, ext3), man pages were 35564KB before compression.
     130  gzip -9 compressed them down to 20372KB (57.28%), bzip2 -9 got down to
    131131  19812KB (55.71%). That is a 1.57% gain in space. YMMV.
    132132
    133   What was not taken into consideration was the decompression speed. But 
    134   does it make sense to? You gain fast access with uncompressed man 
    135   pages, or you gain space at the expense of a slight overhead in time. 
     133  What was not taken into consideration was the decompression speed. But
     134  does it make sense to? You gain fast access with uncompressed man
     135  pages, or you gain space at the expense of a slight overhead in time.
    136136  Well, my P4-2.5GHz does not even let me notice this... :-)
    137137
     
    140140}
    141141
    142 # This function checks that the man page is unique amongst bzip2'd, 
     142# This function checks that the man page is unique amongst bzip2'd,
    143143# gzip'd and uncompressed versions.
    144144#  $1 the directory in which the file resides
    145145#  $2 the file name for the man page
    146 # Returns 0 (true) if the file is the latest and must be taken care of, 
    147 # and 1 (false) if the file is not the latest (and has therefore been 
     146# Returns 0 (true) if the file is the latest and must be taken care of,
     147# and 1 (false) if the file is not the latest (and has therefore been
    148148# deleted).
    149149function check_unique ()
     
    177177MY_NAME=`basename $0`
    178178
    179 # OK, parse the command-line for arguments, and initialize to some 
    180 # sensible state, that is: don't change links state, parse 
    181 # /etc/man.conf, be most silent, search man.conf in /etc, and don't 
     179# OK, parse the command-line for arguments, and initialize to some
     180# sensible state, that is: don't change links state, parse
     181# /etc/man.conf, be most silent, search man.conf in /etc, and don't
    182182# force (re-)compression.
    183183COMP_METHOD=
     
    258258      ;;
    259259    *)
    260       echo "\"$1\" is not an absolute path name" 
     260      echo "\"$1\" is not an absolute path name"
    261261      exit 1
    262262      ;;
     
    286286esac
    287287
    288 # Note: on my machine, 'man --path' gives /usr/share/man twice, once 
     288# Note: on my machine, 'man --path' gives /usr/share/man twice, once
    289289# with a trailing '/', once without.
    290290if [ -z "$MAN_DIR" ]; then
     
    319319  echo "man.conf is.......: ${MAN_CONF}/man.conf"
    320320  echo -n "Hard-links........: "
    321   [ "foo$LN_OPT" = "foo-S" ] &amp;&amp; 
     321  [ "foo$LN_OPT" = "foo-S" ] &amp;&amp;
    322322  echo "convert to soft-links" || echo "leave as is"
    323323  echo -n "Soft-links........: "
    324   [ "foo$LN_OPT" = "foo-H" ] &amp;&amp; 
     324  [ "foo$LN_OPT" = "foo-H" ] &amp;&amp;
    325325  echo "convert to hard-links" || echo "leave as is"
    326326  echo "Backup............: $BACKUP"
     
    344344    echo "Backing up $DIR..." &gt; $DEST_FD0
    345345    [ -f "${DIR_NAME}.tar.old" ] &amp;&amp; rm -f "${DIR_NAME}.tar.old"
    346     [ -f "${DIR_NAME}.tar" ] &amp;&amp; 
     346    [ -f "${DIR_NAME}.tar" ] &amp;&amp;
    347347    mv "${DIR_NAME}.tar" "${DIR_NAME}.tar.old"
    348348    tar -cfv "${DIR_NAME}.tar" "${DIR_NAME}" &gt; $DEST_FD1
     
    361361
    362362    # Fixes the case when hard-links see their compression scheme change
    363     # (from not compressed to compressed, or from bz2 to gz, or from gz 
     363    # (from not compressed to compressed, or from bz2 to gz, or from gz
    364364    # to bz2)
    365     # Also fixes the case when multiple version of the page are present, 
     365    # Also fixes the case when multiple version of the page are present,
    366366    # which are either compressed or not.
    367367    if [ ! -L "$FILE" -a ! -e "$FILE" ]; then continue; fi
     
    371371
    372372    if [ -d "$FILE" ]; then
    373       cd "${MEM_DIR}"  # Go back to where we ran "$0", 
     373      cd "${MEM_DIR}"  # Go back to where we ran "$0",
    374374                       # in case "$0"=="./compressdoc" ...
    375375      # We are going recursive to that directory
     
    426426        # Take care of hard-links: build the list of files hard-linked
    427427        # to the one we are {de,}compressing.
    428         # NB. This is not optimum has the file will eventually be 
    429         # compressed as many times it has hard-links. But for now, 
     428        # NB. This is not optimum has the file will eventually be
     429        # compressed as many times it has hard-links. But for now,
    430430        # that's the safe way.
    431431        inode=`ls -li "$FILE" | awk '{print $1}'`
     
    483483
    484484      else
    485         # There is a problem when we get neither a symlink nor a plain 
     485        # There is a problem when we get neither a symlink nor a plain
    486486        # file. Obviously, we shall never ever come here... :-(
    487487        echo -n "Whaooo... \"${DIR}/${FILE}\" is neither a symlink "
     
    497497chmod 755 /usr/sbin/compressdoc</userinput></screen>
    498498
    499   <para>Now, as <systemitem class="username">root</systemitem>, you can issue a 
    500   <command>compressdoc --bz2</command> to compress all your system man 
    501   pages. You can also run <command>compressdoc --help</command> to get 
     499  <para>Now, as <systemitem class="username">root</systemitem>, you can issue a
     500  <command>compressdoc --bz2</command> to compress all your system man
     501  pages. You can also run <command>compressdoc --help</command> to get
    502502  comprehensive help about what the script is able to do.</para>
    503503
    504   <para> Don't forget that a few programs, like the <application>X Window 
    505   System</application>  and <application>XEmacs</application> also 
    506   install their documentation in non standard places (such as 
    507   <filename class="directory">/usr/X11R6/man</filename>, etc...). Be sure 
    508   to add these locations to the file <filename>/etc/man.conf</filename>, as a 
     504  <para> Don't forget that a few programs, like the <application>X Window
     505  System</application>  and <application>XEmacs</application> also
     506  install their documentation in non standard places (such as
     507  <filename class="directory">/usr/X11R6/man</filename>, etc...). Be sure
     508  to add these locations to the file <filename>/etc/man.conf</filename>, as a
    509509  <envar>MANPATH</envar>=<replaceable>[/path]</replaceable> section.</para>
    510510
     
    518518    ...</literal></screen>
    519519
    520   <para>Generally, package installation systems do not compress man/info pages, 
    521   which means you will need to run the script again if you want to keep the size 
     520  <para>Generally, package installation systems do not compress man/info pages,
     521  which means you will need to run the script again if you want to keep the size
    522522  of your documentation as small as possible. Also, note that running the script
    523   after upgrading a package is safe; when you have several versions of a page 
     523  after upgrading a package is safe; when you have several versions of a page
    524524  (for example, one compressed and one uncompressed), the most recent one is kept
    525525  and the others deleted.</para>
Note: See TracChangeset for help on using the changeset viewer.