cvs commit: BLFS/BOOK/postlfs/config compressdoc.xml

tushar at linuxfromscratch.org tushar at linuxfromscratch.org
Mon Mar 29 23:32:43 PST 2004


tushar      04/03/30 00:32:43

  Modified:    BOOK/introduction/welcome changelog.xml
               BOOK/postlfs/config compressdoc.xml
  Log:
  CompressDoc fixes
  
  Revision  Changes    Path
  1.1032    +4 -0      BLFS/BOOK/introduction/welcome/changelog.xml
  
  Index: changelog.xml
  ===================================================================
  RCS file: /home/cvsroot/BLFS/BOOK/introduction/welcome/changelog.xml,v
  retrieving revision 1.1031
  retrieving revision 1.1032
  diff -u -u -r1.1031 -r1.1032
  --- changelog.xml	30 Mar 2004 06:52:25 -0000	1.1031
  +++ changelog.xml	30 Mar 2004 07:32:43 -0000	1.1032
  @@ -11,6 +11,10 @@
   
   <itemizedlist>
   
  +<listitem><para>March 30th, 2004 [tushar]: Fixed compressdoc script so that it can
  +be called as compressdoc instead of /usr/bin/compressdoc. Moved the script to
  +/usr/sbin.</para></listitem>
  +
   <listitem><para>March 30th, 2004 [tushar]: Updated to xfsprogs-2.6.9.</para></listitem>
   
   <listitem><para>March 27th, 2004 [tushar]: Updated mysql, postgresql, bind, dhcp
  
  
  
  1.17      +12 -7     BLFS/BOOK/postlfs/config/compressdoc.xml
  
  Index: compressdoc.xml
  ===================================================================
  RCS file: /home/cvsroot/BLFS/BOOK/postlfs/config/compressdoc.xml,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -u -r1.16 -r1.17
  --- compressdoc.xml	20 Nov 2003 06:20:26 -0000	1.16
  +++ compressdoc.xml	30 Mar 2004 07:32:43 -0000	1.17
  @@ -10,9 +10,9 @@
   to go is to use the script below.
   </para>
   
  -<screen><userinput><command>cat > /usr/bin/compressdoc << "EOF"</command>
  +<screen><userinput><command>cat > /usr/sbin/compressdoc << "EOF"</command>
   #!/bin/bash
  -# VERSION: 20031029.0025
  +# VERSION: 20040320.0026
   #
   # Compress (with bzip2 or gzip) all man pages in a hierarchy and
   # update symlinks - By Marc Heerdink <marc @ koelkast.net>
  @@ -24,6 +24,8 @@
   # to allow for changing hard-links into soft- ones, to specify the
   # compression level, to parse the man.conf for all occurrences of MANPATH,
   # to allow for a backup, to allow to keep the newest version of a page.
  +# Modified 20040330 by Tushar Teredesai to replace $0 by the name of the script.
  +#   (Note: It is assumed that the script is in the user's PATH)
   #
   # TODO:
   #        - choose a default compress method to be based on the available
  @@ -42,7 +44,7 @@
     if [ -n "$1" ]; then
       echo "Unknown option : $1"
     fi
  -  ( echo "Usage: $0 <comp_method> [options] [dirs]" && \
  +  ( echo "Usage: $MY_NAME <comp_method> [options] [dirs]" && \
     cat << EOT
   Where comp_method is one of :
     --gzip, --gz, -g
  @@ -145,6 +147,9 @@
     return 1
   }
   
  +# Name of the script
  +MY_NAME=`basename $0`
  +
   # OK, parse the command-line for arguments, and initialize to some sensible
   # state, that is : don't change links state, parse /etc/man.conf, be most
   # silent, search man.conf in /etc, and don't force (re-)compression.
  @@ -338,7 +343,7 @@
         echo "-> Entering ${DIR}/${FILE}..." > $DEST_FD0
         # I need not pass --conf, as I specify the directory to work on
         # But I need exit in case of error
  -      "$0" ${COMP_METHOD} ${COMP_LVL} ${LN_OPT} ${VERBOSE_OPT} ${FORCE_OPT} "${DIR}/${FILE}" || exit 1
  +      "$MY_NAME" ${COMP_METHOD} ${COMP_LVL} ${LN_OPT} ${VERBOSE_OPT} ${FORCE_OPT} "${DIR}/${FILE}" || exit 1
         echo "<- Leaving ${DIR}/${FILE}." > $DEST_FD1
         cd "$DIR"  # Needed for the next iteration of the loop
   
  @@ -449,11 +454,11 @@
     done # for FILE
   done # for DIR
   <command>EOF
  -chmod 755 /usr/bin/compressdoc</command></userinput></screen>
  +chmod 755 /usr/sbin/compressdoc</command></userinput></screen>
   
   <para>Now, as root, you can issue a 
  -<command>/usr/bin/compressdoc --bz2</command> to compress all your system man 
  -pages. You can also run <command>/usr/bin/compressdoc --help</command> to get 
  +<command>compressdoc --bz2</command> to compress all your system man 
  +pages. You can also run <command>compressdoc --help</command> to get 
   a comprehensive help about what the script is able to do.</para>
   
   <para> Don't forget that a few programs, like the <application>X</application> 
  
  
  



More information about the blfs-book mailing list