summaryrefslogtreecommitdiffstats
path: root/tools/tools/mid/mid-build
blob: 0a2d4480a5a8b1ce35fedafe63d4d2b9b4f7465e (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
#!/bin/sh
#
# Copyright (c) March 1998 Wolfram Schneider <wosch@FreeBSD.org>
#
# create a Message-ID, In-Reply-To look(1) index database
#
# $FreeBSD$


TMPDIR=/var/tmp; export TMPDIR
home=/g/www/mid

dbout=$home/index
archive=$home/archive

PATH=$home/bin:/bin:/usr/bin:/usr/local/bin; export PATH


all ()
{
    ( cd $archive || exit 1
      find text/* -type f | mid-master-index 4 mid-index $dbout/mid
    )
}

current ()
{
    ( cd $archive || exit 1
    find current/freebsd-* current/cvs-* -type f |
	mid-master-index 1 mid-index $dbout/mid-current
    )
}

if [ $# -le 0 ]; then
	echo "usage mid-build {current|all}"
	exit 1
fi

for db
do
	case $db in
		current) current;;
		all) all;;
		*) echo "Huh? $db";;
	esac
done
OpenPOWER on IntegriCloud