summaryrefslogtreecommitdiff
path: root/Master/bin/win32
diff options
context:
space:
mode:
authorReinhard Kotucha <reinhard.kotucha@web.de>2008-02-16 21:09:38 +0000
committerReinhard Kotucha <reinhard.kotucha@web.de>2008-02-16 21:09:38 +0000
commite4fe12b66b6be4507b0eeebb5c100a21659a6975 (patch)
treeba4cbaf1a23c6d5821d4b285279b9eb5275a84d1 /Master/bin/win32
parent1727e1d324a5d40cad9d204e82f93645d9a56e2d (diff)
bin/win32/updmap.texlua: fixbin() added for testing.
git-svn-id: svn://tug.org/texlive/trunk@6652 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/bin/win32')
-rwxr-xr-xMaster/bin/win32/updmap.texlua24
1 files changed, 16 insertions, 8 deletions
diff --git a/Master/bin/win32/updmap.texlua b/Master/bin/win32/updmap.texlua
index 1f724087d30..f70f805dfd4 100755
--- a/Master/bin/win32/updmap.texlua
+++ b/Master/bin/win32/updmap.texlua
@@ -7,6 +7,18 @@
-- Wrapper for Perl scripts.
+function fixwin (args_unix)
+ if os.type == "windows" then
+ local args_win={} -- new table
+ args_win[0]=args_unix[1]
+ for i=1, #args_unix do
+ args_win[i]='"'..args_unix[i]..'"'
+ end
+ return args_win
+ else
+ return args_unix
+ end
+end
if string.find(arg[0], "/") then -- UNIX path
filename=select(1, string.gsub(arg[0], ".*/", ""))
@@ -18,8 +30,6 @@ end
basename=select(1, string.gsub(filename, "\.texlua$", ""))
--- basename="updmap"
-
kpse.set_program_name(filename)
if string.find(basename, "-sys$") then
@@ -28,6 +38,7 @@ if string.find(basename, "-sys$") then
os.setenv("TEXMFCONFIG", kpse.var_value("TEXMFSYSCONFIG"))
end
+
TEXDIR=kpse.var_value("SELFAUTOPARENT")
os.setenv("PERL5LIB", TEXDIR.."/tlpkg/tlperl/lib")
@@ -37,16 +48,13 @@ os.setenv("PATH", TEXDIR.."/tlpkg/tlgs/bin;"..os.getenv("PATH"))
perlbin=TEXDIR.."/tlpkg/tlperl/bin/perl.exe"
script=kpse.find_file(basename..".pl", "texmfscripts")
-if (os.type == "windows") then
- command={'"'..perlbin..'"', '"'..script..'"'}
-else
- command={ perlbin, script }
-end
-command[0] = perlbin
+command={perlbin, script}
for i=1, #arg do
command[#command+1]=arg[i]
end
+command=fixwin(command)
+
ret=os.spawn(command)
os.exit(ret)