Changeset 6deeee2


Ignore:
Timestamp:
04/21/2008 07:11:32 PM (16 years ago)
Author:
Dan Nichilson <dnicholson@…>
Branches:
10.0, 10.1, 11.0, 11.1, 11.2, 11.3, 12.0, 12.1, 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:
48e6b2a
Parents:
cffe62a2
Message:

Fix compressdoc to call the correct script when working recursively

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

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • introduction/welcome/changelog.xml

    rcffe62a2 r6deeee2  
    4141
    4242-->
     43
     44    <listitem>
     45      <para>April 21st, 2008</para>
     46      <itemizedlist>
     47        <listitem>
     48          <para>[dnicholson] - Bug fixes for the compressdoc script.</para>
     49        </listitem>
     50      </itemizedlist>
     51    </listitem>
    4352
    4453    <listitem>
  • postlfs/config/compressdoc.xml

    rcffe62a2 r6deeee2  
    3333<screen role="root"><?dbfo keep-together="auto"?><userinput>cat &gt; /usr/sbin/compressdoc &lt;&lt; "EOF"
    3434<literal>#!/bin/bash
    35 # VERSION: 20060311.0028
     35# VERSION: 20080421.1112
    3636#
    3737# Compress (with bzip2 or gzip) all man pages in a hierarchy and
     
    5858# Modified 20060311 by Archaic to use Man-DB manpath utility which is a
    5959# replacement for man --path from Man.
     60#
     61# Modified 20080421 by Dan Nicholson to properly execute the correct
     62# compressdoc when working recursively. This means the same compressdoc
     63# will be used whether a full path was given or it was resolved from PATH.
    6064#
    6165# TODO:
     
    381385
    382386    if [ -d "$FILE" ]; then
    383       cd "${MEM_DIR}"  # Go back to where we ran "$0",
    384                        # in case "$0"=="./compressdoc" ...
    385387      # We are going recursive to that directory
    386388      echo "-&gt; Entering ${DIR}/${FILE}..." &gt; $DEST_FD0
    387389      # I need not pass --conf, as I specify the directory to work on
    388       # But I need exit in case of error
    389       "$MY_NAME" ${COMP_METHOD} ${COMP_LVL} ${LN_OPT} ${VERBOSE_OPT} \
    390       ${FORCE_OPT} "${DIR}/${FILE}" || exit 1
     390      # But I need exit in case of error. We must change back to the
     391      # original directory so $0 is resolved correctly.
     392      (cd "$MEM_DIR" &amp;&amp; eval "$0" ${COMP_METHOD} ${COMP_LVL} ${LN_OPT} \
     393        ${VERBOSE_OPT} ${FORCE_OPT} "${DIR}/${FILE}") || exit $?
    391394      echo "&lt;- Leaving ${DIR}/${FILE}." &gt; $DEST_FD1
    392       cd "$DIR"  # Needed for the next iteration of the loop
    393395
    394396    else # !dir
Note: See TracChangeset for help on using the changeset viewer.