-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
doc: make tools/update-authors.sh cross-platform
And by cross-platform I mean Linux and OS X. The awk script is not compatible with BSD awk, that's why this commit changes it to perl. Update the .mailmap to remove some duplicates and regenerate the AUTHORS file. Fixes: #1120 PR-URL: #1121 Reviewed-By: Rod Vagg <rod@vagg.org>
- Loading branch information
1 parent
8453fbc
commit d33a647
Showing
3 changed files
with
27 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,22 @@ | ||
#!/bin/sh | ||
|
||
git log --reverse --format='%aN <%aE>' | awk ' | ||
git log --reverse --format='%aN <%aE>' | perl -we ' | ||
BEGIN { | ||
print "# Authors ordered by first contribution.\n"; | ||
# explicit excludes | ||
excludes["<erik.corry@gmail.com>"] = 1 # chromium team | ||
%seen = (), @authors = (); | ||
} | ||
{ | ||
if ($NF !~ /@chromium.org/ && all[$NF] != 1 && excludes[$NF] != 1) { | ||
all[$NF] = 1; | ||
ordered[length(all)] = $0; | ||
} | ||
while (<>) { | ||
next if $seen{$_}; | ||
next if /\@chromium.org/; | ||
next if /<erik.corry\@gmail.com>/; | ||
$seen{$_} = push @authors, $_; | ||
} | ||
END { | ||
for (i in ordered) { | ||
print ordered[i]; | ||
} | ||
print "\n# Generated by tools/update-authors.sh"; | ||
print "# Authors ordered by first contribution.\n"; | ||
print "\n", @authors, "\n"; | ||
print "# Generated by tools/update-authors.sh\n"; | ||
} | ||
' > AUTHORS |