From 8ffec2a3aba6f114784e11f89ef1d57a096ae540 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 19:39:29 +0200 Subject: Adding upstream version 8.32. Signed-off-by: Daniel Baumann --- thanks-gen | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 thanks-gen (limited to 'thanks-gen') diff --git a/thanks-gen b/thanks-gen new file mode 100755 index 0000000..f1c11b3 --- /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"}++; -- cgit v1.2.3