From d33a647b4bdcbf596aaad0589090dcee0fbf0297 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Wed, 11 Mar 2015 02:50:45 +0100 Subject: [PATCH] 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 --- .mailmap | 9 +++++++++ AUTHORS | 11 ++++++++--- tools/update-authors.sh | 25 ++++++++++--------------- 3 files changed, 27 insertions(+), 18 deletions(-) diff --git a/.mailmap b/.mailmap index 29c23fa775a2a1..9466df35810184 100644 --- a/.mailmap +++ b/.mailmap @@ -19,6 +19,7 @@ Brandon Benvie Brian White Brian White Chew Choon Keat +Colin Ihrig Christopher Lenz Daniel Berger Daniel Chcouri <333222@gmail.com> @@ -76,16 +77,20 @@ Mathias Pettersson Michael Bernstein Michael Wilber Micheil Smith +Micleusanu Nicu Mikael Bourges-Sevenier +Miroslav Bajtoš Mitar Milutinovic Nebu Pookins Nicholas Kinsey +Nikolai Vavilov Onne Gorter Paul Querna Ray Morgan Ray Solomon Raymond Feng Rick Olson +Roman Reiss Ryan Dahl Ryan Emery Sam Shull @@ -101,6 +106,7 @@ Siddharth Mahendraker Simon Willison Stanislav Opichal Stefan Bühler +Steven R. Loomis TJ Holowaychuk TJ Holowaychuk Tadashi SAWADA @@ -117,6 +123,9 @@ Trevor Burnham Tyler Larson Vincent Voyer Willi Eggeling +Yazhong Liu Yazhong Liu +Yazhong Liu Yorkie +Yazhong Liu Yorkie Yoshihiro KIKUCHI Yuichiro MASUI Zachary Scott diff --git a/AUTHORS b/AUTHORS index ab796c74058c20..4c71fad5cf31e5 100644 --- a/AUTHORS +++ b/AUTHORS @@ -444,7 +444,7 @@ Ryan Graham Kelly Gerber Ryan Doenges Sean Silva -Miroslav Bajtoš +Miroslav Bajtoš Olof Johansson Sam Roberts Kevin Locke @@ -517,7 +517,6 @@ Cam Swords Paul Loyd Benjamin Waters Lev Gimelfarb -Yorkie pflannery Tuğrul Topuz Lorenz Leutgeb @@ -655,7 +654,7 @@ Evan Torrie Juanjo brian m. carlson Kevin O'Hara -micnic +Micleusanu Nicu Alejandro Oviedo Ben Burns Julian Duque @@ -723,5 +722,11 @@ Ryan Scheel Benjamin Gruenbaum Pavel Medvedev Russell Dempsey +&! (bitandbang) +h7lin +Michael Dawson +Ruben Verborgh +Ken Perkins +Malte-Thorben Bruns # Generated by tools/update-authors.sh diff --git a/tools/update-authors.sh b/tools/update-authors.sh index f0944889b2cb4f..d07d9c9ff73c43 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[""] = 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 //; + $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