summaryrefslogtreecommitdiff
path: root/Build/source/texk/texlive/getnonfreefonts
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/texlive/getnonfreefonts')
-rw-r--r--Build/source/texk/texlive/getnonfreefonts41
1 files changed, 24 insertions, 17 deletions
diff --git a/Build/source/texk/texlive/getnonfreefonts b/Build/source/texk/texlive/getnonfreefonts
index 3ab220ee570..9c419e65bd7 100644
--- a/Build/source/texk/texlive/getnonfreefonts
+++ b/Build/source/texk/texlive/getnonfreefonts
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
## getnonfreefonts
-## Copyright 2006 Reinhard Kotucha <reinhard.kotucha@web.de>
+## Copyright 2006-2008 Reinhard Kotucha <reinhard.kotucha@web.de>
#
# This work may be distributed and/or modified under the
# conditions of the LaTeX Project Public License, either version 1.3
@@ -11,7 +11,7 @@
#
# The current maintainer is Reinhard Kotucha.
-my $TL_version='2007';
+my $TL_version='2008';
my $getfont_url="ftp://tug.org/tex/getnonfreefonts/getfont$TL_version";
@@ -141,10 +141,9 @@ debug_msg "Internal variable SYSTMP set to '$SYSTMP'";
# Windows usually uses backslashes though forward slashes are probably
# allowed. Perl always needs forward slashes.
-# We convert backslashes to forward slashes if it looks like a Windows
-# directory.
-$SYSTMP=~s/\\/\//g if ($SYSTMP=~/^.:\\/); # c:\abc\def
-$SYSTMP=~s/\\/\//g if ($SYSTMP=~/^\\\\/); # \\abc\def
+# We convert backslashes to forward slashes on Windows.
+$SYSTMP=~s/\\/\//g if ($^O=~/^MSWin(32|64)/i);
+
debug_msg "Internal variable SYSTMP converted to '$SYSTMP'";
@@ -180,8 +179,7 @@ $INSTALLROOT=expand_var "$INSTALLROOTNAME";
debug_msg "INSTALLROOT='$INSTALLROOT'";
-$INSTALLROOT=~s/\\/\//g if ($INSTALLROOT=~/^.:\\/); # c:\abc\def
-$INSTALLROOT=~s/\\/\//g if ($INSTALLROOT=~/^\\\\/); # \\abc\def
+$INSTALLROOT=~s/\\/\//g if ($^O=~/^MSWin(32|64)/i);
debug_msg "Internal variable INSTALLROOT converted to '$INSTALLROOT'";
@@ -235,21 +233,30 @@ sub remove_tmpdir {
rmdir "$tmpdir" or die "! ERROR: Can't remove directory '$tmpdir'.\n";
}
-# Signal handlers for UNIX, maybe ignored by Windows.
+# Signal handlers.
+
+my @common_signals=qw(INT ILL FPE SEGV TERM ABRT);
+my @signals_UNIX=qw(QUIT BUS PIPE);
+my @signals_Win32=qw(BREAK);
+
+
+if ($^O=~/^MSWin(32|64)$/i) {
+ @signals=(@common_signals, @signals_Win32);
+} else {
+ @signals=(@common_signals, @signals_UNIX);
+}
+
+debug_msg "Supported signals: @signals\n";
-$SIG{INT} =\&remove_tmpdir;
-$SIG{QUIT}=\&remove_tmpdir;
-$SIG{BUS} =\&remove_tmpdir;
-$SIG{PIPE}=\&remove_tmpdir;
-$SIG{TERM}=\&remove_tmpdir;
-$SIG{ABRT}=\&remove_tmpdir;
-$SIG{SEGV}=\&remove_tmpdir;
+foreach my $signal (@signals) {
+ $SIG{"$signal"}=\&remove_tmpdir;
+}
# Download the script from tug.org.
debug_msg "Running 'wget $getfont_url'";
-system ('wget', "$getfont_url");
+system ('wget', "$getfont_url") == 0 or die "! Error: Can't execute wget.\n";
# Download the fonts.