nginx-sid/debian/modules/http-lua/util/fix-comments
Christos Trochalakis 515a80bc0a mod: Normalize module locations
Use the package name to infer module location. This
will make it easier to script our maintaining tasks.
2017-10-12 10:37:22 +03:00

27 lines
554 B
Perl

#!/usr/bin/env perl
use strict;
use warnings;
for my $infile (@ARGV) {
warn "Processing $infile...\n";
open my $in, $infile or
die "Cannot open $infile for reading: $!\n";
my $s;
my $changed = 0;
while (<$in>) {
$changed += s{//(.*)}{/* $1 */};
$s .= $_;
}
close $in;
if ($changed) {
my $outfile = $infile;
open my $out, ">$outfile" or
die "Cannot open $outfile for writing: $!\n";
print $out $s;
close $out;
warn "Wrote $outfile\n";
}
}