From b0aae777fc2f4824e88bb67db945f4e1398c5b56 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 22 Feb 2012 00:26:27 +0000 Subject: better quoting git-svn-id: svn://tug.org/texlive/trunk@25468 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/bin/check-files-by-format | 32 +++++++++++++------------------- Master/tlpkg/libexec/place | 2 +- 2 files changed, 14 insertions(+), 20 deletions(-) (limited to 'Master') diff --git a/Master/tlpkg/bin/check-files-by-format b/Master/tlpkg/bin/check-files-by-format index 163ba1e18a2..929799047c8 100755 --- a/Master/tlpkg/bin/check-files-by-format +++ b/Master/tlpkg/bin/check-files-by-format @@ -33,8 +33,9 @@ use TeXLive::TLPDB; # 1 means pdfinfo issues errors but still exits successfully # 2 means pdfinfo exits non-zero my $exclude_pdf = { - 'texmf-dist/doc/fonts/frcursive/frcursive.pdf' => 1, # 14nov11 author cannot fix - 'texmf/dvips/tetex/config.pdf' => 2, # not a PDF file actually + # 14nov11 author cannot fix: + 'texmf-dist/doc/fonts/frcursive/frcursive.pdf' => 1, + 'texmf/dvips/tetex/config.pdf' => 2, # not a PDF file }; # the value has no meaning here @@ -57,6 +58,7 @@ my $exclude_pfb = { '*base*' => 'texmf-dist/fonts/type1', 'public/amsfonts/cmextra/' => 1, 'public/arev/' => 1, 'public/ascii/' => 1, + 'public/aspectratio/' => 1, # 11feb12 reported to author 'public/augie/' => 1, 'public/aurical/' => 1, 'public/bbold-type1/' => 1, # old y&y fonts, won't be changing @@ -187,11 +189,10 @@ my $exclude_otf = { '*base*' => 'texmf-dist/fonts/opentype', my $tmpdir = File::Temp::tempdir(CLEANUP => 1); -exit(main()); +exit(&main()); -sub main -{ +sub main { my @files = get_file_list(); for my $file (grep { /\.pdf$/ } @files) { check_pdf($file); @@ -212,8 +213,7 @@ sub main } # get the list of files in the database of a TL installation -sub get_file_list -{ +sub get_file_list { my $tlpdb = TeXLive::TLPDB->new(root => $tlroot); my @files = (); for my $tlpname ($tlpdb->list_packages) { @@ -228,8 +228,7 @@ sub get_file_list # return the value in exclude list associated to a file, or undef -sub exclude_value -{ +sub exclude_value { my ($exclude, $file) = @_; my $base = $exclude->{'*base*'}; $file =~ s!$base/!! if $base; @@ -238,8 +237,7 @@ sub exclude_value } # check a pdf file -sub check_pdf -{ +sub check_pdf { my ($file) = @_; my $errfile = "$tmpdir/pdferr"; unlink($errfile); @@ -252,8 +250,7 @@ sub check_pdf } # check a pfb file -sub check_pfb -{ +sub check_pfb { my ($file) = @_; return if defined exclude_value($exclude_pfb, $file); my $errfile = "$tmpdir/pfberr"; @@ -263,8 +260,7 @@ sub check_pfb } # check a tfm file -sub check_tfm -{ +sub check_tfm { my ($file) = @_; return if defined exclude_value($exclude_tfm, $file); my $outfile = "$tmpdir/tfmout.pl"; @@ -275,8 +271,7 @@ sub check_tfm } # check a vf file -sub check_vf -{ +sub check_vf { my ($file) = @_; return if defined exclude_value($exclude_vf, $file); (my $tfmfile = $file) =~ s!/vf/!/tfm/!; @@ -290,8 +285,7 @@ sub check_vf } # check an otf file -sub check_otf -{ +sub check_otf { my ($file) = @_; return if defined exclude_value($exclude_otf, $file); my $bad = system("otfinfo --info $tlroot/$file >/dev/null 2>&1"); diff --git a/Master/tlpkg/libexec/place b/Master/tlpkg/libexec/place index bea7f80b37c..4f8c3c2ae08 100755 --- a/Master/tlpkg/libexec/place +++ b/Master/tlpkg/libexec/place @@ -273,7 +273,7 @@ sub add_file { # being binary vs. text, or mixed eol conventions. Attempt to repair # -- just with pdf for now. This is not tested and needs work. # - if (!defined (eval qq(xsystem("svn add \"$newfile\""))) + if (!defined (eval qq(xsystem("svn add '$newfile'"))) && $newfile =~ /\.pdf\$/) { &xsystem ("svn proplist --verbose $newfile"); &xsystem ("svn propset svn:mime-type application/pdf $newfile"); -- cgit v1.2.3