1 |
On 7/6/07, Paul Gibbons <paul@××××××××××××.com> wrote: |
2 |
> |
3 |
> On Tue, 3 Jul 2007 15:19:14 -0700 |
4 |
> "Kevin O'Gorman" <kogorman@×××××.com> wrote: |
5 |
> |
6 |
> > I emerge with the doc USE flag and generally have a bunch of stuff in |
7 |
> > /usr/share/doc. Most of the time it's the HTML stuff I want to read, |
8 |
> > but it's a annoyingly laborious to wade through unindexed |
9 |
> > directgories and get a browser pointing to the right thing. So I |
10 |
> > wrote a little Perl script to create a top-level "index.html", |
11 |
> > organized by package and with a bit of rudimentary pruning. I |
12 |
> > bookmarked it in Firefox, and can get to things a lot faster now. I |
13 |
> > like the result, and will continue to tweak it here and there. |
14 |
> > |
15 |
> > Did I just reinvent a wheel? If not, is there any point it trying to |
16 |
> > make this part of gentoo? If so, how would one do that? |
17 |
> > |
18 |
> > Current script attached. |
19 |
> > |
20 |
> Thanks for the script - it seems to create the index file fine. |
21 |
> However the index.html files are only readable by root. |
22 |
> Is there a treat when running emerge to ensure files are readable by |
23 |
> others? |
24 |
|
25 |
|
26 |
That's an artifact of your umask. I run root with a umask of 022, so I |
27 |
didn't notice the problem. |
28 |
|
29 |
You can add the line |
30 |
umask(0133); |
31 |
to the script (before the open call) to get a sensible 0644 (rw-r--r--) |
32 |
mode. |
33 |
|
34 |
As I've also modified the sorting of entries on each line, in an attempt to |
35 |
make each index.html come first in its directory, I've attached my latest |
36 |
copy to this email. |
37 |
|
38 |
-- |
39 |
Kevin O'Gorman, PhD |