mirror of
https://github.com/Zeckmathederg/glfs.git
synced 2025-01-24 23:32:12 +08:00
CompressDoc fixes
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@1945 af4574ff-66df-0310-9fd7-8a98e5e911e0
This commit is contained in:
parent
aabd7e50cd
commit
4067e17b75
@ -11,6 +11,10 @@ who wrote what.</para>
|
||||
|
||||
<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
|
||||
|
@ -10,9 +10,9 @@ ideas like recursively calling <command>gzip</command> on them. A better way
|
||||
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 go is to use the script below.
|
||||
# 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 @@ function help ()
|
||||
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 @@ function check_unique ()
|
||||
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 @@ for DIR in $MAN_DIR; do
|
||||
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 @@ for DIR in $MAN_DIR; do
|
||||
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>
|
||||
|
Loading…
Reference in New Issue
Block a user