diff options
author | Reinhard Kotucha <reinhard.kotucha@web.de> | 2008-02-21 22:56:21 +0000 |
---|---|---|
committer | Reinhard Kotucha <reinhard.kotucha@web.de> | 2008-02-21 22:56:21 +0000 |
commit | e4e16a12f52374de8eeafaf4265b9c7acc534187 (patch) | |
tree | 071bd9dc1459319dc458ada7e92ce16e2f18ecd4 /Master/bin | |
parent | f90099230db6de68f2285dca3d08174bda872f7a (diff) |
win32/epstopdf: replaced .exe by .texlua.
git-svn-id: svn://tug.org/texlive/trunk@6710 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/bin')
-rwxr-xr-x | Master/bin/win32/epstopdf.exe | bin | 7168 -> 0 bytes | |||
-rwxr-xr-x | Master/bin/win32/epstopdf.texlua | 59 |
2 files changed, 59 insertions, 0 deletions
diff --git a/Master/bin/win32/epstopdf.exe b/Master/bin/win32/epstopdf.exe Binary files differdeleted file mode 100755 index 65199c54670..00000000000 --- a/Master/bin/win32/epstopdf.exe +++ /dev/null diff --git a/Master/bin/win32/epstopdf.texlua b/Master/bin/win32/epstopdf.texlua new file mode 100755 index 00000000000..15604ae9392 --- /dev/null +++ b/Master/bin/win32/epstopdf.texlua @@ -0,0 +1,59 @@ +#!/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. + +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], ".*/", "")) +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$", "")) + +kpse.set_program_name(filename) + +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 + +command=fixwin(command) + +ret=os.spawn(command) +os.exit(ret) |