From a0dc936cc86f414b134c0258ac929307d5d14d2c Mon Sep 17 00:00:00 2001 From: Reinhard Kotucha Date: Fri, 15 Feb 2008 21:50:46 +0000 Subject: getnonfreefonts: updated. Requires a recent version of kpsewhich which supports tilde expansion. git-svn-id: svn://tug.org/texlive/trunk@6641 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/texlive/getnonfreefonts | 41 ++++++++++++++++++------------- 1 file changed, 24 insertions(+), 17 deletions(-) (limited to 'Build/source') 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 +## Copyright 2006-2008 Reinhard Kotucha # # 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. -- cgit v1.2.3