From a0f84fbbee044a29c606009fc7d65cb29543330d Mon Sep 17 00:00:00 2001 From: Siep Kroonenberg Date: Fri, 20 Jun 2008 19:13:43 +0000 Subject: TLPostActions: twice die => warn; commented redundant mkdirhier git-svn-id: svn://tug.org/texlive/trunk@8887 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/TeXLive/TLPostActions.pm | 44 +++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/Master/tlpkg/TeXLive/TLPostActions.pm b/Master/tlpkg/TeXLive/TLPostActions.pm index 3b3d1e9b0ea..1188f0e4b2a 100644 --- a/Master/tlpkg/TeXLive/TLPostActions.pm +++ b/Master/tlpkg/TeXLive/TLPostActions.pm @@ -58,27 +58,31 @@ sub do_install_bin_xetex { "$texdir/bin/win32/cache"), (win32() ? conv_to_win_path("$texmfsysvar/fonts/cache") : "$texmfsysvar/fonts/cache")); - open(FONTSCONF, "<$texdir/bin/win32/conf/fonts.conf") - or die("Cannot open $texdir/bin/win32/conf/fonts.conf"); - my @lines = ; - close(FONTSCONF); - open(FONTSCONF, ">$texmfsysvar/fonts/conf/fonts.conf") - or die("Cannot open $texmfsysvar/fonts/conf/fonts.conf for writing"); - my $winfontdir; - if (win32()) { - $winfontdir = $ENV{'SystemRoot'}.'/fonts'; - $winfontdir =~ s!\\!/!g; - mkdirhier("$texmfsysvar/fonts/cache"); - } - foreach (@lines) { - $_ =~ s!c:/Program Files/texlive/2008!$texdir!; - $_ =~ s!c:/windows/fonts!$winfontdir! if win32(); - # hack around fc-cache problem in from_dvd case: - #if (win32() and (uc($texdir) ne uc($texdirw)) and - # ($_ =~ m!^.*texmf-dist.*!)) { $_ = ''; } - print FONTSCONF; + if (open(FONTSCONF, "<$texdir/bin/win32/conf/fonts.conf")) { + my @lines = ; + close(FONTSCONF); + if (open(FONTSCONF, ">$texmfsysvar/fonts/conf/fonts.conf")) { + my $winfontdir; + if (win32()) { + $winfontdir = $ENV{'SystemRoot'}.'/fonts'; + $winfontdir =~ s!\\!/!g; + #mkdirhier("$texmfsysvar/fonts/cache"); + } + foreach (@lines) { + $_ =~ s!c:/Program Files/texlive/2008!$texdir!; + $_ =~ s!c:/windows/fonts!$winfontdir! if win32(); + # hack around fc-cache problem in from_dvd case: + #if (win32() and (uc($texdir) ne uc($texdirw)) and + # ($_ =~ m!^.*texmf-dist.*!)) { $_ = ''; } + print FONTSCONF; + } + close(FONTSCONF); + } else { + warn("Cannot open $texmfsysvar/fonts/conf/fonts.conf for writing\n"); + } + } else { + warn("Cannot open $texdir/bin/win32/conf/fonts.conf\n"); } - close(FONTSCONF); } # call fc-cache but only when we install on win32! if (win32()) { -- cgit v1.2.3