aboutsummaryrefslogtreecommitdiffstats
path: root/make-authors-short.pl
diff options
context:
space:
mode:
Diffstat (limited to 'make-authors-short.pl')
-rwxr-xr-xmake-authors-short.pl37
1 files changed, 25 insertions, 12 deletions
diff --git a/make-authors-short.pl b/make-authors-short.pl
index caa8b5bc90..ac96b0c264 100755
--- a/make-authors-short.pl
+++ b/make-authors-short.pl
@@ -1,18 +1,31 @@
-#!/usr/bin/perl -w
-
# $Id$
-use strict;
+# Remove tasks from individual author entries from AUTHORS file
+# for use in the about dialog.
+#
+# Must be called via perlnoutf.
-# Unset environment variables so perl doesn't
-# interpret bytes as UTF-8 characters
+use strict;
-delete $ENV{LANG};
-delete $ENV{LANGUAGE};
-delete $ENV{LC_ALL};
-delete $ENV{LC_CTYPE};
+my $subinfo=0;
+my $nextline;
-# Call make-authors-short2.pl in same directory, using same interpreter
+$_ = <>;
+s/\xef\xbb\xbf//; # Skip UTF-8 byte order mark
+print unless /^\n/;
-(my $prog2 = $0) =~ s/\.pl$/2.pl/;
-system($^X, "$prog2", @ARGV);
+while (<>) {
+ if (/(.*){/) {
+ $subinfo = 1;
+ print "$1\n";
+ } elsif (/}/) {
+ $subinfo = 0;
+ if (($nextline = <>) !~ /^[\s]*$/) {
+ print $nextline;
+ }
+ } elsif ($subinfo == 1) {
+ next;
+ } else {
+ print;
+ }
+}