1998-08-24 23:08:56 +00:00
|
|
|
open INFILE, "<$ARGV[1]";
|
|
|
|
$build = <INFILE>;
|
|
|
|
close INFILE;
|
|
|
|
chop $build;
|
1999-03-27 00:35:59 +00:00
|
|
|
open INFILE, "<$ARGV[0]" || die;
|
|
|
|
open OUTFILE, ">$ARGV[0].old" || die;
|
1998-08-24 23:08:56 +00:00
|
|
|
|
|
|
|
while (<INFILE>) {
|
1999-03-27 00:35:59 +00:00
|
|
|
|
|
|
|
$id = $_;
|
|
|
|
if ($id =~ "Build ID:") {
|
1999-04-07 17:00:27 +00:00
|
|
|
$temp = "Build ID: " . $build;
|
|
|
|
$id =~ s/Build ID:\s\d+/$temp/;
|
|
|
|
print OUTFILE $id;
|
1999-03-27 00:35:59 +00:00
|
|
|
}
|
1999-08-24 00:56:04 +00:00
|
|
|
elsif ($id =~ "NS_BUILD_ID") {
|
|
|
|
$temp = "NS_BUILD_ID " . $build;
|
|
|
|
$id =~ s/NS_BUILD_ID\s\d+/$temp/;
|
|
|
|
print OUTFILE $id;
|
|
|
|
}
|
1999-03-27 00:35:59 +00:00
|
|
|
else {
|
|
|
|
print OUTFILE $_;
|
|
|
|
}
|
1998-08-24 23:08:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
close INFILE;
|
|
|
|
close OUTFILE;
|
|
|
|
|
|
|
|
rename "$ARGV[0].old", "$ARGV[0]";
|