blob: 054054b52143477963278f820988c2226533e7ca (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
--- man-1.6e.orig/src/makewhatis.sh 2006-07-19 01:58:08.000000000 -0300
+++ man-1.6e/src/makewhatis.sh 2007-05-18 10:54:57.000000000 -0300
@@ -124,7 +124,7 @@
continue;;
-s) setsections=1
continue;;
- -u) findarg="-ctime 0"
+ -u) findarg="-newer /var/cache/man/whatis"
update=1
continue;;
-v) verbose=1
@@ -165,14 +165,7 @@
# first truncate all the whatis files that will be created new,
# then only update - we might visit the same directory twice
if [ x$update = x ]; then
- for pages in man cat
- do
- eval path="\$$pages"path
- for mandir in $path
- do
- cp /dev/null $mandir/whatis
- done
- done
+ cp /dev/null /var/cache/man/whatis
fi
for pages in man cat
@@ -184,11 +177,6 @@
if [ x$verbose != x ]; then
echo "about to enter $mandir" > /dev/stderr
fi
- if [ -s ${mandir}/whatis -a $pages = man -a x$update = x ]; then
- if [ x$verbose != x ]; then
- echo skipping $mandir - we did it already > /dev/stderr
- fi
- else
here=`pwd`
cd $mandir
for i in $sections
@@ -407,23 +395,14 @@
cd $here
- # kludge for Slackware's /usr/man/preformat
- if [ $mandir = /usr/man/preformat ]
- then
- mandir1=/usr/man
- else
- mandir1=$mandir
- fi
-
- if [ -f ${mandir1}/whatis ]
+ if [ -f /var/cache/man/whatis ]
then
- cat ${mandir1}/whatis >> $TMPFILE
+ cat /var/cache/man/whatis >> $TMPFILE
fi
- tr -s '\n' < $TMPFILE | sort -u > ${mandir1}/whatis
+ tr -s '\n' < $TMPFILE | sort -u > /var/cache/man/whatis
- chmod 644 ${mandir1}/whatis
+ chmod 644 /var/cache/man/whatis
rm $TMPFILE
- fi
done
done
|