summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorSiep Kroonenberg <siepo@cybercomm.nl>2008-06-20 19:13:43 +0000
committerSiep Kroonenberg <siepo@cybercomm.nl>2008-06-20 19:13:43 +0000
commita0f84fbbee044a29c606009fc7d65cb29543330d (patch)
treef0d336019b00a5aacec7afcb5886ad01278e31a4 /Master
parentfceb2fe74a75c9263c068befef6143ab67478945 (diff)
TLPostActions: twice die => warn; commented redundant mkdirhier
git-svn-id: svn://tug.org/texlive/trunk@8887 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/tlpkg/TeXLive/TLPostActions.pm44
1 files 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 = <FONTSCONF>;
- 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!^<dir>.*texmf-dist.*</dir>!)) { $_ = '<!-- '.$_.' -->'; }
- print FONTSCONF;
+ if (open(FONTSCONF, "<$texdir/bin/win32/conf/fonts.conf")) {
+ my @lines = <FONTSCONF>;
+ 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!^<dir>.*texmf-dist.*</dir>!)) { $_ = '<!-- '.$_.' -->'; }
+ 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()) {