blob: ad0edb44a318158bd63d0e60ec317bba236f8065 (
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
#
# Written by Lars Thalmann, lars@mysql.com, 2003.
#
use strict;
umask 000;
# -----------------------------------------------------------------------------
# Settings
# -----------------------------------------------------------------------------
$ENV{LD_LIBRARY_PATH} = "/usr/local/lib:/opt/as/local/lib";
$ENV{LD_LIBRARY_PATH} = $ENV{LD_LIBRARY_PATH} . ":/opt/as/forte6/SUNWspro/lib";
$ENV{PATH} = $ENV{PATH} . ":/usr/local/bin:/opt/as/local/bin";
$ENV{PATH} = $ENV{PATH} . ":/opt/as/local/teTeX/bin/sparc-sun-solaris2.8";
my $destdir = @ARGV[0];
my $title = ""; # $ARGV[1];
my $release;
if (defined $ENV{'NDB_RELEASE'}) {
$release = $ENV{'NDB_RELEASE'};
print "----------------------------------------------------------------\n";
print "Relase = " . $release . "\n";
print "----------------------------------------------------------------\n";
} else {
print "----------------------------------------------------------------\n";
print "NDB Documentation is being modified to statndard format\n";
print "(If you want this automatic, use env variable NDB_RELEASE.)\n";
print "Enter release (Examples: \"1.43.0 (alpha)\" or \"2.1.0 (gamma)\"): ";
$release = <stdin>;
print "----------------------------------------------------------------\n";
}
# -----------------------------------------------------------------------------
# Change a little in refman.tex
# -----------------------------------------------------------------------------
open (INFILE, "< ${destdir}/refman.tex")
or die "Error opening ${destdir}/refman.tex.\n";
open (OUTFILE, "> ${destdir}/refman.tex.new")
or die "Error opening ${destdir}/refman.tex.new.\n";
while (<INFILE>)
{
if (/(.*)(RELEASE)(.*)$/) {
print OUTFILE $1 . $release . $3;
} elsif (/(.*)(DATE)(.*)$/) {
print OUTFILE $1 . localtime() . $3;
} elsif (/\\chapter\{File Index\}/) {
# Erase
} elsif (/\\input\{files\}/) {
# Erase
} elsif (/\\chapter\{Hierarchical Index\}/) {
# Erase
} elsif (/\\input\{hierarchy\}/) {
# Erase
} elsif (/\\chapter\{Page Index\}/) {
# Erase
} elsif (/\\input\{pages\}/) {
# Erase
} else {
print OUTFILE;
}
}
close INFILE;
close OUTFILE;
system("mv ${destdir}/refman.tex.new ${destdir}/refman.tex");
# -----------------------------------------------------------------------------
# Change a little in doxygen.sty
# -----------------------------------------------------------------------------
open (INFILE, "< ${destdir}/doxygen.sty")
or die "Error opening INFILE.\n";
open (OUTFILE, "> ${destdir}/doxygen.sty.new")
or die "Error opening OUTFILE.\n";
while (<INFILE>)
{
if (/\\rfoot/) {
print OUTFILE "\\rfoot[\\fancyplain{}{\\bfseries\\small \\copyright~Copyright 2003-2004 MySQL AB\\hfill support-cluster\@mysql.com}]{}\n";
} elsif (/\\lfoot/) {
print OUTFILE "\\lfoot[]{\\fancyplain{}{\\bfseries\\small support-cluster\@mysql.com\\hfill \\copyright~Copyright 2003-2004 MySQL AB}}\n";
} else {
print OUTFILE;
}
}
close INFILE;
close OUTFILE;
system("mv ${destdir}/doxygen.sty.new ${destdir}/doxygen.sty");
|