diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-11 08:21:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-11 08:21:29 +0000 |
commit | 29cd838eab01ed7110f3ccb2e8c6a35c8a31dbcc (patch) | |
tree | 63ef546b10a81d461e5cf5ed9e98a68cd7dee1aa /src/grep/thanks-gen | |
parent | Initial commit. (diff) | |
download | kbuild-e48fe8ce9d7780c2e25428a70815d2c87c580412.tar.xz kbuild-e48fe8ce9d7780c2e25428a70815d2c87c580412.zip |
Adding upstream version 1:0.1.9998svn3589+dfsg.upstream/1%0.1.9998svn3589+dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/grep/thanks-gen')
-rwxr-xr-x | src/grep/thanks-gen | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/grep/thanks-gen b/src/grep/thanks-gen new file mode 100755 index 0000000..f1c11b3 --- /dev/null +++ b/src/grep/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"}++; |