summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2008-05-01 21:09:37 +0000
committerNorbert Preining <preining@logic.at>2008-05-01 21:09:37 +0000
commit9fc6b592467e5490e4e6d09c6742fa308a91cbaa (patch)
treee0d4ad44581fe28417bfaa8b442f9a38cefb8295 /Build
parent7b5d6090b560327fb73f8ac9d3a6abae0373c120 (diff)
use .bat wrappers instead of .texlua
- replace many wrappers with a default .bat file - change the check-wrapper script - do not make the PATHEXT and association magic in windows git-svn-id: svn://tug.org/texlive/trunk@7785 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/texlive/tl-w32-starter.bat8
-rwxr-xr-xBuild/source/texk/texlive/tl-w32-wrapper.texlua20
2 files changed, 18 insertions, 10 deletions
diff --git a/Build/source/texk/texlive/tl-w32-starter.bat b/Build/source/texk/texlive/tl-w32-starter.bat
new file mode 100644
index 00000000000..fe949613d7c
--- /dev/null
+++ b/Build/source/texk/texlive/tl-w32-starter.bat
@@ -0,0 +1,8 @@
+@echo off
+rem tl-w32-starter.bat
+rem universal script starter, batch file part
+rem this program calls the tl-w32-wrapper.texlua
+setlocal
+set ownpath=%~dp0%
+texlua "%ownpath%tl-w32-wrapper.texlua" "%~dpn0" %*
+endlocal
diff --git a/Build/source/texk/texlive/tl-w32-wrapper.texlua b/Build/source/texk/texlive/tl-w32-wrapper.texlua
index 81c8a83940c..03ce75a91c3 100755
--- a/Build/source/texk/texlive/tl-w32-wrapper.texlua
+++ b/Build/source/texk/texlive/tl-w32-wrapper.texlua
@@ -21,23 +21,23 @@ function fixwin(args_unix)
end
if string.find(arg[0], '/') then -- UNIX path
- filename=select(1, string.gsub(arg[0], '.*/', ''))
+ progname = select(1, string.gsub(arg[1], '.*/', ''))
elseif string.find(arg[0], '\\') then -- Windows path
- filename=select(1, string.gsub(arg[0], '.*\\', ''))
+ progname = select(1, string.gsub(arg[1], '.*\\', ''))
else -- no path
- filename=arg[0]
+ progname = arg[1]
end
-basename=select(1, string.gsub(filename, '\.texlua$', ''))
-
sys=false
-if string.find(basename, '-sys$') then
- basename=select(1, string.gsub(basename, '-sys$', ''))
+if string.find(progname, '-sys$') then
+ basename = select(1, string.gsub(progname, '-sys$', ''))
sys=true
+else
+ basename = progname
end
-kpse.set_program_name(filename, basename)
+kpse.set_program_name(progname..".bat", progname)
TEXDIR=kpse.var_value('SELFAUTOPARENT')
BINDIR=kpse.var_value('SELFAUTOLOC')
@@ -71,11 +71,11 @@ elseif kpse.find_file(basename..'.tlu', 'texmfscripts') then
script=kpse.find_file(basename..'.tlu', 'texmfscripts')
command={'texlua', script}
else
- io.stderr:write(filename..'.texlua: '..basename..
+ io.stderr:write(basename..'.bat: '..basename..
': No appropriate script found.\n')
end
-for i=1, #arg do
+for i=2, #arg do
command[#command+1]=arg[i]
end