diff options
-rwxr-xr-x | Master/bin/win32/updmap-sys.pl | 21 | ||||
-rwxr-xr-x | Master/bin/win32/updmap-sys.texlua | 49 | ||||
-rwxr-xr-x | Master/bin/win32/updmap.exe | bin | 10752 -> 0 bytes | |||
-rwxr-xr-x | Master/bin/win32/updmap.texlua | 44 | ||||
-rwxr-xr-x | Master/install-tl.pl | 10 |
5 files changed, 77 insertions, 47 deletions
diff --git a/Master/bin/win32/updmap-sys.pl b/Master/bin/win32/updmap-sys.pl deleted file mode 100755 index f81e2afa315..00000000000 --- a/Master/bin/win32/updmap-sys.pl +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env perl - -# updmap-sys: wrapper script for updmap with TEXMFVAR and -# TEXMFCONFIG set to TEXMFSYSVAR / TEXMFSYSCONFIG - -# Copyright 2007 Reinhard Kotucha -# This file is licensed under the GNU General Public License version 2 -# or any later version. - -# Originally provided as a shell script written by Thomas Esser. -$^W=1; - -my $TEXMFSYSVAR=`kpsewhich -var-value TEXMFSYSVAR`; -chomp ($TEXMFSYSVAR); -$ENV{"$TEXMFVAR"}="$TEXMFSYSVAR"; - -my $TEXMFSYSCONFIG=`kpsewhich -var-value TEXMFSYSVAR`; -chomp ($TEXMFSYSCONFIG); -$ENV{"$TEXMFCONFIG"}="$TEXMFSYSCONFIG"; - -exec ('updmap', @ARGV); diff --git a/Master/bin/win32/updmap-sys.texlua b/Master/bin/win32/updmap-sys.texlua index 72cd33225f3..ba112ae6652 100755 --- a/Master/bin/win32/updmap-sys.texlua +++ b/Master/bin/win32/updmap-sys.texlua @@ -1,33 +1,44 @@ -#!/usr/bin/env texlua +#!/xusr/bin/env texlua --*-Lua-*- ---[[ $Id$ +-- $Id$ -Copyright (C) 2007 Reinhard Kotucha. -You may freely use, modify and/or distribute this file. +-- Copyright (C) 2007 Reinhard Kotucha. +-- You may freely use, modify and/or distribute this file. -Originally written as a Bourne shell script by Thomas Esser, -ported to texlua by Reinhard Kotucha. - -Wrapper script for updmap-sys. ]] +-- Wrapper for Perl scripts. kpse.set_program_name('texlua') -TEXDIR=kpse.var_value('SELFAUTOPARENT') +if string.find(arg[0], "/") then -- UNIX path + filename=select(1, string.gsub(arg[0], ".*/", "")) +elseif string.find(arg[0], "\\") then -- Windows path + filename=select(1, string.gsub(arg[0], ".*\\", "")) +else -- no path + filename=arg[0] +end + +basename=select(1, string.gsub(filename, "\.texlua$", "")) -perl=TEXDIR .. '/tlpkg/tlperl/bin/perl.exe' -PERL5LIB=TEXDIR .. '/tlpkg/tlperl/lib' -os.setenv('PERL5LIB', PERL5LIB) +if string.find(basename, "-sys$") then + basename=select(1, string.gsub(basename, "-sys$", "")) + os.setenv("TEXMFVAR", kpse.var_value("TEXMFSYSVAR")) + os.setenv("TEXMFCONFIG", kpse.var_value("TEXMFSYSCONFIG")) +end + +TEXDIR=kpse.var_value("SELFAUTOPARENT") -updmap_script=kpse.find_file("updmap.pl", "texmfscripts") +os.setenv("PERL5LIB", TEXDIR.."/tlpkg/tlperl/lib") +os.setenv("GS_LIB", TEXDIR.."/tlpkg/tlgs/lib") +os.setenv("PATH", TEXDIR.."/tlpkg/tlgs/bin;"..os.getenv("PATH")) -os.setenv('TEXMFVAR', kpse.var_value('TEXMFSYSVAR')) -os.setenv('TEXMFCONFIG', kpse.var_value('TEXMFSYSCONFIG')) +perlbin=TEXDIR.."/tlpkg/tlperl/bin/perl.exe" +script=kpse.find_file(basename..".pl", "texmfscripts") -updmap={perl, updmap_script} +command={perlbin, script} for i=1, #arg do - updmap[#arg+1]=arg[i] + command[#command+1]=arg[i] end -os.spawn(updmap); - +ret=os.spawn(command) +os.exit(ret) diff --git a/Master/bin/win32/updmap.exe b/Master/bin/win32/updmap.exe Binary files differdeleted file mode 100755 index 116c5fc9242..00000000000 --- a/Master/bin/win32/updmap.exe +++ /dev/null diff --git a/Master/bin/win32/updmap.texlua b/Master/bin/win32/updmap.texlua new file mode 100755 index 00000000000..ba112ae6652 --- /dev/null +++ b/Master/bin/win32/updmap.texlua @@ -0,0 +1,44 @@ +#!/xusr/bin/env texlua +--*-Lua-*- +-- $Id$ + +-- Copyright (C) 2007 Reinhard Kotucha. +-- You may freely use, modify and/or distribute this file. + +-- Wrapper for Perl scripts. + +kpse.set_program_name('texlua') + +if string.find(arg[0], "/") then -- UNIX path + filename=select(1, string.gsub(arg[0], ".*/", "")) +elseif string.find(arg[0], "\\") then -- Windows path + filename=select(1, string.gsub(arg[0], ".*\\", "")) +else -- no path + filename=arg[0] +end + +basename=select(1, string.gsub(filename, "\.texlua$", "")) + +if string.find(basename, "-sys$") then + basename=select(1, string.gsub(basename, "-sys$", "")) + os.setenv("TEXMFVAR", kpse.var_value("TEXMFSYSVAR")) + os.setenv("TEXMFCONFIG", kpse.var_value("TEXMFSYSCONFIG")) +end + +TEXDIR=kpse.var_value("SELFAUTOPARENT") + +os.setenv("PERL5LIB", TEXDIR.."/tlpkg/tlperl/lib") +os.setenv("GS_LIB", TEXDIR.."/tlpkg/tlgs/lib") +os.setenv("PATH", TEXDIR.."/tlpkg/tlgs/bin;"..os.getenv("PATH")) + +perlbin=TEXDIR.."/tlpkg/tlperl/bin/perl.exe" +script=kpse.find_file(basename..".pl", "texmfscripts") + +command={perlbin, script} + +for i=1, #arg do + command[#command+1]=arg[i] +end + +ret=os.spawn(command) +os.exit(ret) diff --git a/Master/install-tl.pl b/Master/install-tl.pl index 21d61d7712c..15b15ef081b 100755 --- a/Master/install-tl.pl +++ b/Master/install-tl.pl @@ -801,13 +801,9 @@ sub do_postinst_stuff { system('mktexlsr', "$TEXDIR/texmf-dist", "$TEXDIR/texmf", "$TEXDIR/texmf-local"); - if (win32) { - tllog($::LOG_NORMAL, "running updmap-sys\n"); - system('updmap-sys.texlua', '--nohash'); - } else { - tllog($::LOG_NORMAL, "running updmap-sys\n"); - system('updmap-sys', '--nohash'); - } + tllog($::LOG_NORMAL, "running updmap-sys\n"); + system('updmap-sys', '--nohash'); + tllog($::LOG_NORMAL, "re-running mktexlsr $TEXMFSYSVAR\n"); system('mktexlsr', "$TEXMFSYSVAR"); |