compressdoc with bad man page directory name

Dan Nicholson dbn.lists at gmail.com
Sat Mar 3 08:54:07 PST 2007


On 3/2/07, rfc <rfc at sonic.net> wrote:
> if you give compressdoc a bad man page directory name, it recursively
> compresses (and chmod's) the files in the current working directory.
> no, i wasn't in / at the time ... B-)
>
> here is my (minimally tested) workaround:
>
> --- /usr/sbin/compressdoc.old   2007-02-18 19:38:40.000000000 -0800
> +++ /usr/sbin/compressdoc       2007-03-01 17:57:53.000000000 -0800
> @@ -330,12 +330,23 @@
>  # I know MAN_DIR has only absolute path names
>  # I need to take into account the localized man, so I'm going recursive
>  for DIR in $MAN_DIR; do
> +  if [ ! -d "$DIR" ]; then
> +    echo "$DIR: Not a directory"
> +    continue
> +  fi
>    MEM_DIR=`pwd`
>    cd "$DIR"
>    for FILE in *; do

Good call. That's a good change to make. It should probably go into
the backup section above, too. I.e., anywhere it does `for DIR in
$MAN_DIR'.

Bruce, would it be possible to move compressdoc into the auxfiles
section of the repo so we can get it under version control? I can't
recall the process we took to get the wget files for Xorg-7 in there.
IIRC, we have to fix up the render script on Anduin and tell Justin
that he needs to mirror it.

What do you think?

--
Dan



More information about the blfs-dev mailing list