summaryrefslogtreecommitdiff
path: root/deps/npm/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/scripts')
-rwxr-xr-xdeps/npm/scripts/update-authors.sh20
1 files changed, 9 insertions, 11 deletions
diff --git a/deps/npm/scripts/update-authors.sh b/deps/npm/scripts/update-authors.sh
index 8708e240ed..326d21cc8c 100755
--- a/deps/npm/scripts/update-authors.sh
+++ b/deps/npm/scripts/update-authors.sh
@@ -1,20 +1,18 @@
#!/bin/sh
-git log --reverse --format='%aN <%aE>' | awk '
+git log --reverse --format='%aN <%aE>' | perl -we '
+
BEGIN {
- print "# Authors sorted by whether or not they'\''re me";
+ %seen = (), @authors = ();
}
-{
- if (all[$NF] != 1) {
- all[$NF] = 1;
- ordered[length(all)] = $0;
- }
+while (<>) {
+ next if $seen{$_};
+ $seen{$_} = push @authors, $_;
}
END {
- for (i in ordered) {
- print ordered[i];
- }
+ print "# Authors sorted by whether or not they'\''re me\n";
+ print @authors;
}
-' > AUTHORS \ No newline at end of file
+' > AUTHORS