Skip to content

Commit a12eef6

Browse files
committed
find-copyrights.pl: updates for git
And minor whitespace cleanup.
1 parent 58e6213 commit a12eef6

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

contrib/dist/find-copyrights.pl

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,19 @@
1515

1616
# Ensure that we're in the top of an SVN or hg directory.
1717

18-
my $good = 0;
19-
$good = 1
20-
if (-d ".hg");
21-
$good = 1
22-
if (-d ".svn" && -f "README.WINDOWS.txt" && -f "VERSION");
2318
die "Must be in root of OMPI tree"
24-
if (!$good);
19+
if (! -d ".git");
2520

2621
# Find all interesting files (skip the top-level LICENSE file)
2722
my @files;
2823
&File::Find::find(
2924
sub {
3025
push(@files, $File::Find::name)
31-
if ($_ ne "." && $_ ne ".." &&
26+
if ($_ ne "." && $_ ne ".." &&
3227
!($_ eq "LICENSE" && $File::Find::dir eq ".") &&
3328
$_ !~ /~$/ && $_ !~ /\.bak$/ && $_ !~ /\.orig$/ &&
3429
-f $_ && ! -l $_ &&
35-
$File::Find::dir !~ /\.svn/ &&
30+
$File::Find::dir !~ /\.git/ &&
3631
$File::Find::dir !~ /\.libs/ &&
3732
$File::Find::dir !~ /\.deps/);
3833
},
@@ -66,7 +61,7 @@ sub save {
6661
}
6762
return;
6863
}
69-
64+
7065
# Save a single year
7166
if (!exists($copyrights->{$core}->{$org}->{$year}->{$file})) {
7267
$copyrights->{$core}->{$org}->{$year}->{$file} = 1;
@@ -104,7 +99,7 @@ sub save {
10499
$current = $2;
105100
}
106101
# Beginning of something else
107-
elsif (defined($current) &&
102+
elsif (defined($current) &&
108103
($line =~ /\s*\*\s*$/ ||
109104
$line =~ /^\s*$/ ||
110105
$line =~ /^\s*\#\s*$/)) {
@@ -149,7 +144,7 @@ sub save {
149144
foreach my $c (qw/1 0/) {
150145
print "========= Core: $c\n";
151146
foreach my $org (sort(keys(%{$copyrights->{$c}}))) {
152-
print "$org: " . join(",",
147+
print "$org: " . join(",",
153148
sort(keys(%{$copyrights->{$c}->{$org}}))) . "\n";
154149
}
155150
}

0 commit comments

Comments
 (0)