Hi guys,

Since there is a precedent set with the convert-mans shell script, I
thought it might be alright to add a simple shell script to rebuild
the info dir file.  I'm always trying to remember the commands, then
end up looking here:

http://www.linuxfromscratch.org/lfs/view/development/chapter06/texinfo.html

So, here's one implementation of a shell script that could be
installed as /usr/bin/rebuild-info.

=====
#!/bin/bash
DIRS=
if [ "$@" ]; then
       DIRS=$@
else
       DIRS=/usr/share/info
fi

for D in $DIRS; do
       [ -d ${D} ] || {
               echo -e "\nError: \"$D\" is not a directory\!\n" >&2
               exit 1
       }

       cd $D
       rm -f dir
       for info in *; do
               install-info $info dir 2>/dev/null
       done
       unset info
done
=====

What do you guys think?  I'm not closely attached to any details in
the script.  It's just what seemed reasonable to me.

--
Dan
--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to