added subroutine to adjust agent number everytime you build. for official releases only.

This commit is contained in:
cyeh%netscape.com 1998-08-27 22:04:19 +00:00
Родитель 09cf1ace57
Коммит afc0de8193
1 изменённых файлов: 37 добавлений и 1 удалений

Просмотреть файл

@ -4,7 +4,7 @@ package BuildList;
require Exporter;
@ISA = qw(Exporter);
@EXPORT = qw(BuildMozilla DistMozilla SetBuildNumber);
@EXPORT = qw(BuildMozilla DistMozilla SetBuildNumber SetAgentString);
=head1 NAME
@ -359,5 +359,41 @@ sub DistMozilla()
}
sub SetAgentString
{
use Cwd;
$cwd = cwd();
print $cwd;
open (BDATE, ":mozilla:config:build_number") || die "could not open buildnumber";
while (<BDATE>) {
$build_number = $_;
}
close (BDATE);
open (ORIGFILE, ":mozilla:cmd:macfe:restext:custom.r") || die "no original file";
open (OUTPUT, ">:mozilla:cmd:macfe:restext:agent.r") || die "no output file";
chop($build_number);
while (<ORIGFILE>) {
$tempstring = $_;
if ($tempstring =~ "\#define VERSION_MAJOR_STR") {
$tempstring = "\#define VERSION_MAJOR_STR \"5.0a1-" . $build_number . " Development\"\n";
}
print OUTPUT $tempstring;
}
close (ORIGFILE);
close (OUTPUT);
unlink (":mozilla:cmd:macfe:restext:custom.r");
rename (":mozilla:cmd:macfe:restext:agent.r", ":mozilla:cmd:macfe:restext:custom.r");
}
1;