1# Copyright (C) 2003, 2005 MySQL AB 2# Use is subject to license terms 3# 4# This program is free software; you can redistribute it and/or modify 5# it under the terms of the GNU General Public License, version 2.0, 6# as published by the Free Software Foundation. 7# 8# This program is also distributed with certain software (including 9# but not limited to OpenSSL) that is licensed under separate terms, 10# as designated in a particular file or component or in included license 11# documentation. The authors of MySQL hereby grant you an additional 12# permission to link the program and your derivative works with the 13# separately licensed software that they have included with MySQL. 14# 15# This program is distributed in the hope that it will be useful, 16# but WITHOUT ANY WARRANTY; without even the implied warranty of 17# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18# GNU General Public License, version 2.0, for more details. 19# 20# You should have received a copy of the GNU General Public License 21# along with this program; if not, write to the Free Software 22# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 23 24# 25# Written by Lars Thalmann, lars@mysql.com, 2003. 26# 27 28use strict; 29umask 000; 30 31# ----------------------------------------------------------------------------- 32# Settings 33# ----------------------------------------------------------------------------- 34 35$ENV{LD_LIBRARY_PATH} = "/usr/local/lib:/opt/as/local/lib"; 36$ENV{LD_LIBRARY_PATH} = $ENV{LD_LIBRARY_PATH} . ":/opt/as/forte6/SUNWspro/lib"; 37$ENV{PATH} = $ENV{PATH} . ":/usr/local/bin:/opt/as/local/bin"; 38$ENV{PATH} = $ENV{PATH} . ":/opt/as/local/teTeX/bin/sparc-sun-solaris2.8"; 39 40my $destdir = @ARGV[0]; 41my $title = ""; # $ARGV[1]; 42 43my $release; 44if (defined $ENV{'NDB_RELEASE'}) { 45 $release = $ENV{'NDB_RELEASE'}; 46 print "----------------------------------------------------------------\n"; 47 print "Relase = " . $release . "\n"; 48 print "----------------------------------------------------------------\n"; 49} else { 50 print "----------------------------------------------------------------\n"; 51 print "NDB Documentation is being modified to statndard format\n"; 52 print "(If you want this automatic, use env variable NDB_RELEASE.)\n"; 53 print "Enter release (Examples: \"1.43.0 (alpha)\" or \"2.1.0 (gamma)\"): "; 54 $release = <stdin>; 55 print "----------------------------------------------------------------\n"; 56} 57 58# ----------------------------------------------------------------------------- 59# Change a little in refman.tex 60# ----------------------------------------------------------------------------- 61 62open (INFILE, "< ${destdir}/refman.tex") 63 or die "Error opening ${destdir}/refman.tex.\n"; 64open (OUTFILE, "> ${destdir}/refman.tex.new") 65 or die "Error opening ${destdir}/refman.tex.new.\n"; 66 67while (<INFILE>) 68{ 69 if (/(.*)(RELEASE)(.*)$/) { 70 print OUTFILE $1 . $release . $3; 71 } elsif (/(.*)(DATE)(.*)$/) { 72 print OUTFILE $1 . localtime() . $3; 73 } elsif (/\\chapter\{File Index\}/) { 74 # Erase 75 } elsif (/\\input\{files\}/) { 76 # Erase 77 } elsif (/\\chapter\{Hierarchical Index\}/) { 78 # Erase 79 } elsif (/\\input\{hierarchy\}/) { 80 # Erase 81 } elsif (/\\chapter\{Page Index\}/) { 82 # Erase 83 } elsif (/\\input\{pages\}/) { 84 # Erase 85 } else { 86 print OUTFILE; 87 } 88} 89 90close INFILE; 91close OUTFILE; 92 93system("mv ${destdir}/refman.tex.new ${destdir}/refman.tex"); 94 95# ----------------------------------------------------------------------------- 96# Change a little in doxygen.sty 97# ----------------------------------------------------------------------------- 98 99open (INFILE, "< ${destdir}/doxygen.sty") 100 or die "Error opening INFILE.\n"; 101open (OUTFILE, "> ${destdir}/doxygen.sty.new") 102 or die "Error opening OUTFILE.\n"; 103 104while (<INFILE>) 105{ 106 if (/\\rfoot/) { 107 print OUTFILE "\\rfoot[\\fancyplain{}{\\bfseries\\small \\copyright~Copyright 2003-2008 MySQL AB, 2008 Sun Microsystems, Inc.\\hfill support-cluster\@mysql.com}]{}\n"; 108 } elsif (/\\lfoot/) { 109 print OUTFILE "\\lfoot[]{\\fancyplain{}{\\bfseries\\small support-cluster\@mysql.com\\hfill \\copyright~Copyright 2003-2008 MySQL AB, 2008 Sun Microsystems, Inc.}}\n"; 110 } else { 111 print OUTFILE; 112 } 113} 114 115close INFILE; 116close OUTFILE; 117 118system("mv ${destdir}/doxygen.sty.new ${destdir}/doxygen.sty"); 119 120