summaryrefslogtreecommitdiff
path: root/support/mkjobtexmf/clean-case.pl
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /support/mkjobtexmf/clean-case.pl
Initial commit
Diffstat (limited to 'support/mkjobtexmf/clean-case.pl')
-rwxr-xr-xsupport/mkjobtexmf/clean-case.pl20
1 files changed, 20 insertions, 0 deletions
diff --git a/support/mkjobtexmf/clean-case.pl b/support/mkjobtexmf/clean-case.pl
new file mode 100755
index 0000000000..fe72e184d0
--- /dev/null
+++ b/support/mkjobtexmf/clean-case.pl
@@ -0,0 +1,20 @@
+#!/usr/bin/env perl
+use strict;
+$^W=1;
+
+@ARGV == 2 or die "!!! Syntax: <input file> <output file>\n";
+
+my $infile = $ARGV[0];
+my $outfile = $ARGV[1];
+
+open(IN, '<', $infile) or die "!!! Error: Cannot open `$infile'!\n";
+open(OUT, '>', $outfile) or die "!!! Error: Cannot write `$outfile'!\n";
+while (<IN>) {
+ s/^(=head[1] [A-Z])(.*)/$1\L$2\E/;
+ s/(L<"[A-Z])([^"]+)">/$1\L$2\E">/g;
+ print OUT;
+}
+close(IN);
+close(OUT);
+
+__END__