diff options
Diffstat (limited to 'Master/texmf-dist/doc/generic/mkjobtexmf/clean-case.pl')
-rw-r--r-- | Master/texmf-dist/doc/generic/mkjobtexmf/clean-case.pl | 20 |
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__ |