summaryrefslogtreecommitdiff
path: root/Master/bin
diff options
context:
space:
mode:
authorReinhard Kotucha <reinhard.kotucha@web.de>2008-01-28 21:50:54 +0000
committerReinhard Kotucha <reinhard.kotucha@web.de>2008-01-28 21:50:54 +0000
commite1667dd8555f43bd329cd8dd3223853c3a6d9143 (patch)
tree85fac48884d98a78317e8c3be723c0c4b6c1423e /Master/bin
parentc64fafc8acb9d661fe1184e630d05d23e3b5ad1b (diff)
updmap: replace irun by texlua script.
install-tl.pl: call updmap-sys without extension. git-svn-id: svn://tug.org/texlive/trunk@6438 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/bin')
-rwxr-xr-xMaster/bin/win32/updmap-sys.pl21
-rwxr-xr-xMaster/bin/win32/updmap-sys.texlua49
-rwxr-xr-xMaster/bin/win32/updmap.exebin10752 -> 0 bytes
-rwxr-xr-xMaster/bin/win32/updmap.texlua44
4 files changed, 74 insertions, 40 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
deleted file mode 100755
index 116c5fc9242..00000000000
--- a/Master/bin/win32/updmap.exe
+++ /dev/null
Binary files differ
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)