On 7/6/07, Paul Gibbons <[EMAIL PROTECTED]> wrote:

On Tue, 3 Jul 2007 15:19:14 -0700
"Kevin O'Gorman" <[EMAIL PROTECTED]> wrote:

> I emerge with the doc USE flag and generally have a bunch of stuff in
> /usr/share/doc.  Most of the time it's the HTML stuff I want to read,
> but it's a annoyingly laborious to wade through unindexed
> directgories and get a browser pointing to the right thing.  So I
> wrote a little Perl script to create a top-level "index.html",
> organized by package and with a bit of rudimentary pruning.  I
> bookmarked it in Firefox, and can get to things a lot faster now.  I
> like the result, and will continue to tweak it here and there.
>
> Did I just reinvent a wheel? If not, is there any point it trying to
> make this part of gentoo?  If so, how would one do that?
>
> Current script attached.
>
Thanks for the script - it seems to create the index file fine.
However the index.html files are only readable by root.
Is there a treat when running emerge to ensure files are readable by
others?


That's an artifact of your umask.  I run root with a umask of 022, so I
didn't notice the problem.

You can add the line
   umask(0133);
to the script (before the open call) to get a sensible 0644 (rw-r--r--)
mode.

As I've also modified the sorting of entries on each line, in an attempt to
make each index.html come first in its directory, I've attached my latest
copy to this email.

--
Kevin O'Gorman, PhD

Attachment: makeindex.perl
Description: Binary data

Reply via email to