From 2f20081e4ec1f4d0478285bec99f8b3350f6f7ad Mon Sep 17 00:00:00 2001 From: Manuel Pégourié-Gonnard Date: Wed, 3 Mar 2010 12:22:05 +0000 Subject: Also check tfm files. git-svn-id: svn://tug.org/texlive/trunk@17301 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/bin/tl-check-files-by-format | 32 ++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) (limited to 'Master/tlpkg/bin') diff --git a/Master/tlpkg/bin/tl-check-files-by-format b/Master/tlpkg/bin/tl-check-files-by-format index 1e83a3bf582..ef69066001e 100755 --- a/Master/tlpkg/bin/tl-check-files-by-format +++ b/Master/tlpkg/bin/tl-check-files-by-format @@ -3,7 +3,7 @@ # # Check that files in various formats are in good shape. # -# The following formats are checked currenly: pdf, pfb. +# The following formats are checked currenly: pdf, pfb, tfm. # # For each format, there is one routine &check_ and an exclusion 'list' # (hash reference) $exclude_: the keys are either a directory name if @@ -13,7 +13,6 @@ # associated check_ routine. # # Formats that might be added: -# - tfm with tftopl $file /tmp/dummy.pl (no exit code, check stderr) # - vf with vftovp $file vf_to_tfm($file) /tmp/dummy.vpl (stderr) # - afm with (afm2pl?) # - otf with otfinfo -i -q >/dev/null @@ -132,10 +131,23 @@ my $exclude_pfb = { '*base*' => 'texmf-dist/fonts/type1', 'wadalab/mcj/' => 1, 'wadalab/mrj/' => 1, }; -# mpg: are these files actually broken?? Should look for the actual errors an +# mpg: are these files actually broken?? Should look for the actual errors and # check with a font expert which are dummy, then filter them out. # For remaining packages, we'll have to contact upstream authors. +# the value has no meaning here +my $exclude_tfm = { '*base*' => 'texmf-dist/fonts/tfm', + 'public/arev/' => 1, + 'public/cmcyr/' => 1, + 'public/dozenal/' => 1, + 'jknappen/ec/' => 1, + 'jknappen/fc/' => 1, + 'public/gfsbodoni/' => 1, + 'public/malayalam/' => 1, + 'public/wnri/' => 1, + 'public/wsuipa/' => 1, +}; + my $tmpdir = File::Temp::tempdir(CLEANUP => 1); exit(main()); @@ -149,6 +161,9 @@ sub main for my $file (grep { /\.pfb$/ } @files) { check_pfb($file); } + for my $file (grep { /\.tfm$/ } @files) { + check_tfm($file); + } return 0; } @@ -199,5 +214,16 @@ sub check_pfb print "Broken PFB: $file\n" if $bad; } +# check a tfm file +sub check_tfm +{ + my ($file) = @_; + return if defined exclude_value($exclude_tfm, $file); + my $outfile = "$tmpdir/tfmout.pl"; + my $errfile = "$tmpdir/tfmerr"; + unlink($errfile); + system("tftopl $tlroot/$file $outfile 2>$errfile"); + print "Broken tfm: $file\n" if -s $errfile; +} # vim: sw=2 expandtab -- cgit v1.2.3