Changeset 4067e17b for postlfs


Ignore:
Timestamp:
03/30/2004 07:32:43 AM (20 years ago)
Author:
Tushar Teredesai <tushar@…>
Branches:
10.0, 10.1, 11.0, 11.1, 11.2, 11.3, 12.0, 12.1, 6.0, 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, v5_1, v5_1-pre1, xry111/intltool, xry111/llvm18, xry111/soup3, xry111/test-20220226, xry111/xf86-video-removal
Children:
6b9ec8d
Parents:
aabd7e5
Message:

CompressDoc fixes

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • postlfs/config/compressdoc.xml

    raabd7e5 r4067e17b  
    1111</para>
    1212
    13 <screen><userinput><command>cat &gt; /usr/bin/compressdoc &lt;&lt; "EOF"</command>
     13<screen><userinput><command>cat &gt; /usr/sbin/compressdoc &lt;&lt; "EOF"</command>
    1414#!/bin/bash
    15 # VERSION: 20031029.0025
     15# VERSION: 20040320.0026
    1616#
    1717# Compress (with bzip2 or gzip) all man pages in a hierarchy and
     
    2525# compression level, to parse the man.conf for all occurrences of MANPATH,
    2626# to allow for a backup, to allow to keep the newest version of a page.
     27# Modified 20040330 by Tushar Teredesai to replace $0 by the name of the script.
     28#   (Note: It is assumed that the script is in the user's PATH)
    2729#
    2830# TODO:
     
    4345    echo "Unknown option : $1"
    4446  fi
    45   ( echo "Usage: $0 &lt;comp_method&gt; [options] [dirs]" &amp;&amp; \
     47  ( echo "Usage: $MY_NAME &lt;comp_method&gt; [options] [dirs]" &amp;&amp; \
    4648  cat &lt;&lt; EOT
    4749Where comp_method is one of :
     
    145147  return 1
    146148}
     149
     150# Name of the script
     151MY_NAME=`basename $0`
    147152
    148153# OK, parse the command-line for arguments, and initialize to some sensible
     
    339344      # I need not pass --conf, as I specify the directory to work on
    340345      # But I need exit in case of error
    341       "$0" ${COMP_METHOD} ${COMP_LVL} ${LN_OPT} ${VERBOSE_OPT} ${FORCE_OPT} "${DIR}/${FILE}" || exit 1
     346      "$MY_NAME" ${COMP_METHOD} ${COMP_LVL} ${LN_OPT} ${VERBOSE_OPT} ${FORCE_OPT} "${DIR}/${FILE}" || exit 1
    342347      echo "&lt;- Leaving ${DIR}/${FILE}." &gt; $DEST_FD1
    343348      cd "$DIR"  # Needed for the next iteration of the loop
     
    450455done # for DIR
    451456<command>EOF
    452 chmod 755 /usr/bin/compressdoc</command></userinput></screen>
     457chmod 755 /usr/sbin/compressdoc</command></userinput></screen>
    453458
    454459<para>Now, as root, you can issue a
    455 <command>/usr/bin/compressdoc --bz2</command> to compress all your system man
    456 pages. You can also run <command>/usr/bin/compressdoc --help</command> to get
     460<command>compressdoc --bz2</command> to compress all your system man
     461pages. You can also run <command>compressdoc --help</command> to get
    457462a comprehensive help about what the script is able to do.</para>
    458463
Note: See TracChangeset for help on using the changeset viewer.