diff options
author | Jim Meyering <meyering@fb.com> | 2014-06-06 17:17:55 -0700 |
---|---|---|
committer | Jim Meyering <meyering@fb.com> | 2014-06-27 13:01:36 -0700 |
commit | 775b724c36e90c90ef520f0294057d4072b1fe66 (patch) | |
tree | afbe024b8ba045c1e273fa726092eaf76c23a246 /thanks-gen | |
parent | 639bfd84e719c451d810015d51386f6a0cc47a0d (diff) | |
download | grep-775b724c36e90c90ef520f0294057d4072b1fe66.tar.gz |
maint: generate distributed THANKS from VC'd THANKS.in
* Makefile.am (THANKS): New rule.
* THANKS.in: New file.
* THANKS: Remove. Now it's generated from the combination of
THANKS.in and git logs.
* .mailmap: New file.
* cfg.mk (sc_THANKS_in_duplicates): New syntax-check rule, from
coreutils.
* .gitignore: Add THANKS.
* thanks-gen: New file, from coreutils.
Diffstat (limited to 'thanks-gen')
-rwxr-xr-x | thanks-gen | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/thanks-gen b/thanks-gen new file mode 100755 index 00000000..f1c11b3a --- /dev/null +++ b/thanks-gen @@ -0,0 +1,16 @@ +#!/usr/bin/perl -nl +# Use Perl's multi-byte alignment code, via sprintf, while +# performing a rudimentary check for duplicate names and +# removing duplicate name,email pairs. +use Encode; + +BEGIN { my (%seen, %name) } + +chomp; +my ($name, $email) = split '\0', decode ('UTF-8', $_); + +$seen{$name}++ + and warn "$0: THANKS.in: duplicate name: $name\n"; + +print encode ('UTF-8', sprintf ('%-36s', $name)), $email + unless $seen{"$name\0$email"}++; |