зеркало из https://github.com/mozilla/gecko-dev.git
19 строки
281 B
Perl
19 строки
281 B
Perl
|
open INFILE, "<$ARGV[1]";
|
||
|
$build = <INFILE>;
|
||
|
close INFILE;
|
||
|
chop $build;
|
||
|
open INFILE, "<$ARGV[0]";
|
||
|
open OUTFILE, ">$ARGV[0].old";
|
||
|
|
||
|
while (<INFILE>) {
|
||
|
if (/<TITLE>Version/) {
|
||
|
s/-[0-9]+/-$build/;
|
||
|
}
|
||
|
print OUTFILE $_;
|
||
|
}
|
||
|
|
||
|
close INFILE;
|
||
|
close OUTFILE;
|
||
|
|
||
|
rename "$ARGV[0].old", "$ARGV[0]";
|