diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2015-03-11 02:50:45 +0100 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2015-03-11 13:25:17 +0100 |
commit | d33a647b4bdcbf596aaad0589090dcee0fbf0297 (patch) | |
tree | e5db428083c1cd300232c8616af985c32a74ef59 /tools/update-authors.sh | |
parent | 8453fbc8799cef98697f96be0e2f75f0fc021e41 (diff) | |
download | node-new-d33a647b4bdcbf596aaad0589090dcee0fbf0297.tar.gz |
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: https://github.com/iojs/io.js/issues/1120
PR-URL: https://github.com/iojs/io.js/pull/1121
Reviewed-By: Rod Vagg <rod@vagg.org>
Diffstat (limited to 'tools/update-authors.sh')
-rwxr-xr-x | tools/update-authors.sh | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/tools/update-authors.sh b/tools/update-authors.sh index f0944889b2..d07d9c9ff7 100755 --- a/tools/update-authors.sh +++ b/tools/update-authors.sh @@ -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 |