summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/mkjobtexmf/clean-case.pl
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-12-05 00:23:53 +0000
committerKarl Berry <karl@freefriends.org>2011-12-05 00:23:53 +0000
commita3820a32b1f8c604520d9fcf34069b4e0a73a89a (patch)
treec70af98636c9e2fdff4f6e0b721cb93fed1b5afc /Master/texmf-dist/doc/generic/mkjobtexmf/clean-case.pl
parent757da55142bf500fb11d5e9567bf1cec3b1dc18b (diff)
mkjobtexmf 0.8 (11nov11)
git-svn-id: svn://tug.org/texlive/trunk@24758 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/generic/mkjobtexmf/clean-case.pl')
-rw-r--r--Master/texmf-dist/doc/generic/mkjobtexmf/clean-case.pl20
1 files changed, 20 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/generic/mkjobtexmf/clean-case.pl b/Master/texmf-dist/doc/generic/mkjobtexmf/clean-case.pl
new file mode 100644
index 00000000000..fe72e184d02
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/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__