gecko-dev/config/aboutime.pl

19 строки
281 B
Perl
Исходник Обычный вид История

1998-08-25 03:08:56 +04:00
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]";