Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorForrest L Norvell <forrest@npmjs.com>2015-05-22 08:34:28 +0300
committerForrest L Norvell <forrest@npmjs.com>2015-05-22 08:34:28 +0300
commitb499806ed6e0c55ac1ae3ec39cb974960e70040b (patch)
treeae1627bf94403fa18c65a976b5f7bdc0ef210834 /scripts
parent6a54917fbd4df995495a95d4b548defd44b77c93 (diff)
doc: use a preversion script to update AUTHORS
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/update-authors.sh15
1 files changed, 3 insertions, 12 deletions
diff --git a/scripts/update-authors.sh b/scripts/update-authors.sh
index 326d21cc8..75a6e549b 100755
--- a/scripts/update-authors.sh
+++ b/scripts/update-authors.sh
@@ -1,18 +1,9 @@
#!/bin/sh
-git log --reverse --format='%aN <%aE>' | perl -we '
-
+git log --reverse --format='%aN <%aE>' | perl -wnE '
BEGIN {
- %seen = (), @authors = ();
-}
-
-while (<>) {
- next if $seen{$_};
- $seen{$_} = push @authors, $_;
+ say "# Authors sorted by whether or not they\x27re me";
}
-END {
- print "# Authors sorted by whether or not they'\''re me\n";
- print @authors;
-}
+print $seen{$_} = $_ unless $seen{$_}
' > AUTHORS