diff options
author | Karl Berry <karl@freefriends.org> | 2008-04-26 00:34:54 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2008-04-26 00:34:54 +0000 |
commit | d18a85166ab3f33952f42e91c0cf1266db1d3918 (patch) | |
tree | fdd9d05c52deda4a5506b6f21a743895c13279e5 /Master/bin | |
parent | 419a1f0cf66ecfd6f2198bc991c529b73dcc9b15 (diff) |
make all wrappers the same file
git-svn-id: svn://tug.org/texlive/trunk@7660 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/bin')
-rwxr-xr-x | Master/bin/win32/a2ping.texlua | 92 | ||||
-rwxr-xr-x | Master/bin/win32/e2pall.texlua | 92 | ||||
-rwxr-xr-x | Master/bin/win32/epstopdf.texlua | 4 | ||||
-rwxr-xr-x | Master/bin/win32/fmtutil-sys.texlua | 2 | ||||
-rwxr-xr-x | Master/bin/win32/getnonfreefonts-sys.texlua | 2 | ||||
-rwxr-xr-x | Master/bin/win32/getnonfreefonts.texlua | 4 | ||||
-rwxr-xr-x | Master/bin/win32/makeglossaries.texlua | 92 | ||||
-rwxr-xr-x | Master/bin/win32/pdfcrop.texlua | 92 | ||||
-rwxr-xr-x | Master/bin/win32/pdfthumb.texlua | 65 | ||||
-rwxr-xr-x | Master/bin/win32/perltex.texlua | 92 | ||||
-rwxr-xr-x | Master/bin/win32/pkfix.texlua | 92 | ||||
-rwxr-xr-x | Master/bin/win32/ppower4.texlua | 65 | ||||
-rwxr-xr-x | Master/bin/win32/ps2eps.texlua | 92 | ||||
-rwxr-xr-x | Master/bin/win32/texcount.texlua | 92 | ||||
-rwxr-xr-x | Master/bin/win32/texdoctk.texlua | 4 | ||||
-rwxr-xr-x | Master/bin/win32/texindy.texlua | 2 | ||||
-rwxr-xr-x | Master/bin/win32/thumbpdf.texlua | 4 | ||||
-rwxr-xr-x | Master/bin/win32/tlmgr.texlua | 4 | ||||
-rwxr-xr-x | Master/bin/win32/updmap-sys.texlua | 2 | ||||
-rwxr-xr-x | Master/bin/win32/updmap.texlua | 2 | ||||
-rwxr-xr-x | Master/bin/win32/vpe.texlua | 92 | ||||
-rwxr-xr-x | Master/bin/win32/xindy.texlua | 2 |
22 files changed, 958 insertions, 32 deletions
diff --git a/Master/bin/win32/a2ping.texlua b/Master/bin/win32/a2ping.texlua new file mode 100755 index 00000000000..45aa25162e5 --- /dev/null +++ b/Master/bin/win32/a2ping.texlua @@ -0,0 +1,92 @@ +#! /usr/bin/env texlua +--*-Lua-*- +-- $Id: tl-w32-wrapper.texlua 7659 2008-04-26 00:33:32Z karl $ + +-- Copyright (C) 2007, 2008 Reinhard Kotucha, Norbert Preining. +-- You may freely use, modify and/or distribute this file. + +-- Wrapper for 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$', '')) + +sys=false + +if string.find(basename, '-sys$') then + basename=select(1, string.gsub(basename, '-sys$', '')) + sys=true +end + +kpse.set_program_name(filename, basename) +TEXDIR=kpse.var_value('SELFAUTOPARENT') +BINDIR=kpse.var_value('SELFAUTOLOC') + +perlbin=TEXDIR..'/tlpkg/tlperl/bin/perl.exe' + +os.setenv('PATH', TEXDIR..'/tlpkg/tlgs/bin;'.. + TEXDIR..'/tlpkg/installer;'.. + os.getenv('PATH')) + +os.setenv('WGETRC', TEXDIR..'/tlpkg/installer/wgetrc') +os.setenv('PERL5LIB', TEXDIR..'/tlpkg/tlperl/lib') +os.setenv('GS_LIB', TEXDIR..'/tlpkg/tlgs/lib;'..TEXDIR..'/tlpkg/tlgs/fonts') + +if sys then + os.setenv('TEXMFVAR', kpse.var_value('TEXMFSYSVAR')) + os.setenv('TEXMFCONFIG', kpse.var_value('TEXMFSYSCONFIG')) + os.setenv('TEX_SYS_PROG', 'true') +end + +if sys and lfs.isfile(BINDIR..'/'..basename..'.exe') then + command={BINDIR..'/'..basename..'.exe'} +elseif lfs.isfile(BINDIR..'/'..basename..'-bin.exe') then + command={BINDIR..'/'..basename..'-bin.exe'} +elseif lfs.isfile(BINDIR..'/'..basename..'.pl') then + script=BINDIR..'/'..basename..'.pl' + command={perlbin, script} +elseif kpse.find_file(basename..'.pl', 'texmfscripts') then + script=kpse.find_file(basename..'.pl', 'texmfscripts') + command={perlbin, script} +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.. + ': No appropriate script found.\n') +end + +for i=1, #arg do + command[#command+1]=arg[i] +end + +command=fixwin(command) + +--[[ Prepend an additional hyphen to activate this code. +for i=0, #command do + print (command[i]) +end +os.exit(ret) +--]] + +ret=os.spawn(command) +os.exit(ret) diff --git a/Master/bin/win32/e2pall.texlua b/Master/bin/win32/e2pall.texlua new file mode 100755 index 00000000000..45aa25162e5 --- /dev/null +++ b/Master/bin/win32/e2pall.texlua @@ -0,0 +1,92 @@ +#! /usr/bin/env texlua +--*-Lua-*- +-- $Id: tl-w32-wrapper.texlua 7659 2008-04-26 00:33:32Z karl $ + +-- Copyright (C) 2007, 2008 Reinhard Kotucha, Norbert Preining. +-- You may freely use, modify and/or distribute this file. + +-- Wrapper for 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$', '')) + +sys=false + +if string.find(basename, '-sys$') then + basename=select(1, string.gsub(basename, '-sys$', '')) + sys=true +end + +kpse.set_program_name(filename, basename) +TEXDIR=kpse.var_value('SELFAUTOPARENT') +BINDIR=kpse.var_value('SELFAUTOLOC') + +perlbin=TEXDIR..'/tlpkg/tlperl/bin/perl.exe' + +os.setenv('PATH', TEXDIR..'/tlpkg/tlgs/bin;'.. + TEXDIR..'/tlpkg/installer;'.. + os.getenv('PATH')) + +os.setenv('WGETRC', TEXDIR..'/tlpkg/installer/wgetrc') +os.setenv('PERL5LIB', TEXDIR..'/tlpkg/tlperl/lib') +os.setenv('GS_LIB', TEXDIR..'/tlpkg/tlgs/lib;'..TEXDIR..'/tlpkg/tlgs/fonts') + +if sys then + os.setenv('TEXMFVAR', kpse.var_value('TEXMFSYSVAR')) + os.setenv('TEXMFCONFIG', kpse.var_value('TEXMFSYSCONFIG')) + os.setenv('TEX_SYS_PROG', 'true') +end + +if sys and lfs.isfile(BINDIR..'/'..basename..'.exe') then + command={BINDIR..'/'..basename..'.exe'} +elseif lfs.isfile(BINDIR..'/'..basename..'-bin.exe') then + command={BINDIR..'/'..basename..'-bin.exe'} +elseif lfs.isfile(BINDIR..'/'..basename..'.pl') then + script=BINDIR..'/'..basename..'.pl' + command={perlbin, script} +elseif kpse.find_file(basename..'.pl', 'texmfscripts') then + script=kpse.find_file(basename..'.pl', 'texmfscripts') + command={perlbin, script} +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.. + ': No appropriate script found.\n') +end + +for i=1, #arg do + command[#command+1]=arg[i] +end + +command=fixwin(command) + +--[[ Prepend an additional hyphen to activate this code. +for i=0, #command do + print (command[i]) +end +os.exit(ret) +--]] + +ret=os.spawn(command) +os.exit(ret) diff --git a/Master/bin/win32/epstopdf.texlua b/Master/bin/win32/epstopdf.texlua index e6d974e19d2..45aa25162e5 100755 --- a/Master/bin/win32/epstopdf.texlua +++ b/Master/bin/win32/epstopdf.texlua @@ -1,8 +1,8 @@ #! /usr/bin/env texlua --*-Lua-*- --- $Id$ +-- $Id: tl-w32-wrapper.texlua 7659 2008-04-26 00:33:32Z karl $ --- Copyright (C) 2007 Reinhard Kotucha, Norbert Preining. +-- Copyright (C) 2007, 2008 Reinhard Kotucha, Norbert Preining. -- You may freely use, modify and/or distribute this file. -- Wrapper for scripts. diff --git a/Master/bin/win32/fmtutil-sys.texlua b/Master/bin/win32/fmtutil-sys.texlua index e6d974e19d2..81c8a83940c 100755 --- a/Master/bin/win32/fmtutil-sys.texlua +++ b/Master/bin/win32/fmtutil-sys.texlua @@ -2,7 +2,7 @@ --*-Lua-*- -- $Id$ --- Copyright (C) 2007 Reinhard Kotucha, Norbert Preining. +-- Copyright (C) 2007, 2008 Reinhard Kotucha, Norbert Preining. -- You may freely use, modify and/or distribute this file. -- Wrapper for scripts. diff --git a/Master/bin/win32/getnonfreefonts-sys.texlua b/Master/bin/win32/getnonfreefonts-sys.texlua index e6d974e19d2..81c8a83940c 100755 --- a/Master/bin/win32/getnonfreefonts-sys.texlua +++ b/Master/bin/win32/getnonfreefonts-sys.texlua @@ -2,7 +2,7 @@ --*-Lua-*- -- $Id$ --- Copyright (C) 2007 Reinhard Kotucha, Norbert Preining. +-- Copyright (C) 2007, 2008 Reinhard Kotucha, Norbert Preining. -- You may freely use, modify and/or distribute this file. -- Wrapper for scripts. diff --git a/Master/bin/win32/getnonfreefonts.texlua b/Master/bin/win32/getnonfreefonts.texlua index e6d974e19d2..45aa25162e5 100755 --- a/Master/bin/win32/getnonfreefonts.texlua +++ b/Master/bin/win32/getnonfreefonts.texlua @@ -1,8 +1,8 @@ #! /usr/bin/env texlua --*-Lua-*- --- $Id$ +-- $Id: tl-w32-wrapper.texlua 7659 2008-04-26 00:33:32Z karl $ --- Copyright (C) 2007 Reinhard Kotucha, Norbert Preining. +-- Copyright (C) 2007, 2008 Reinhard Kotucha, Norbert Preining. -- You may freely use, modify and/or distribute this file. -- Wrapper for scripts. diff --git a/Master/bin/win32/makeglossaries.texlua b/Master/bin/win32/makeglossaries.texlua new file mode 100755 index 00000000000..45aa25162e5 --- /dev/null +++ b/Master/bin/win32/makeglossaries.texlua @@ -0,0 +1,92 @@ +#! /usr/bin/env texlua +--*-Lua-*- +-- $Id: tl-w32-wrapper.texlua 7659 2008-04-26 00:33:32Z karl $ + +-- Copyright (C) 2007, 2008 Reinhard Kotucha, Norbert Preining. +-- You may freely use, modify and/or distribute this file. + +-- Wrapper for 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$', '')) + +sys=false + +if string.find(basename, '-sys$') then + basename=select(1, string.gsub(basename, '-sys$', '')) + sys=true +end + +kpse.set_program_name(filename, basename) +TEXDIR=kpse.var_value('SELFAUTOPARENT') +BINDIR=kpse.var_value('SELFAUTOLOC') + +perlbin=TEXDIR..'/tlpkg/tlperl/bin/perl.exe' + +os.setenv('PATH', TEXDIR..'/tlpkg/tlgs/bin;'.. + TEXDIR..'/tlpkg/installer;'.. + os.getenv('PATH')) + +os.setenv('WGETRC', TEXDIR..'/tlpkg/installer/wgetrc') +os.setenv('PERL5LIB', TEXDIR..'/tlpkg/tlperl/lib') +os.setenv('GS_LIB', TEXDIR..'/tlpkg/tlgs/lib;'..TEXDIR..'/tlpkg/tlgs/fonts') + +if sys then + os.setenv('TEXMFVAR', kpse.var_value('TEXMFSYSVAR')) + os.setenv('TEXMFCONFIG', kpse.var_value('TEXMFSYSCONFIG')) + os.setenv('TEX_SYS_PROG', 'true') +end + +if sys and lfs.isfile(BINDIR..'/'..basename..'.exe') then + command={BINDIR..'/'..basename..'.exe'} +elseif lfs.isfile(BINDIR..'/'..basename..'-bin.exe') then + command={BINDIR..'/'..basename..'-bin.exe'} +elseif lfs.isfile(BINDIR..'/'..basename..'.pl') then + script=BINDIR..'/'..basename..'.pl' + command={perlbin, script} +elseif kpse.find_file(basename..'.pl', 'texmfscripts') then + script=kpse.find_file(basename..'.pl', 'texmfscripts') + command={perlbin, script} +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.. + ': No appropriate script found.\n') +end + +for i=1, #arg do + command[#command+1]=arg[i] +end + +command=fixwin(command) + +--[[ Prepend an additional hyphen to activate this code. +for i=0, #command do + print (command[i]) +end +os.exit(ret) +--]] + +ret=os.spawn(command) +os.exit(ret) diff --git a/Master/bin/win32/pdfcrop.texlua b/Master/bin/win32/pdfcrop.texlua new file mode 100755 index 00000000000..45aa25162e5 --- /dev/null +++ b/Master/bin/win32/pdfcrop.texlua @@ -0,0 +1,92 @@ +#! /usr/bin/env texlua +--*-Lua-*- +-- $Id: tl-w32-wrapper.texlua 7659 2008-04-26 00:33:32Z karl $ + +-- Copyright (C) 2007, 2008 Reinhard Kotucha, Norbert Preining. +-- You may freely use, modify and/or distribute this file. + +-- Wrapper for 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$', '')) + +sys=false + +if string.find(basename, '-sys$') then + basename=select(1, string.gsub(basename, '-sys$', '')) + sys=true +end + +kpse.set_program_name(filename, basename) +TEXDIR=kpse.var_value('SELFAUTOPARENT') +BINDIR=kpse.var_value('SELFAUTOLOC') + +perlbin=TEXDIR..'/tlpkg/tlperl/bin/perl.exe' + +os.setenv('PATH', TEXDIR..'/tlpkg/tlgs/bin;'.. + TEXDIR..'/tlpkg/installer;'.. + os.getenv('PATH')) + +os.setenv('WGETRC', TEXDIR..'/tlpkg/installer/wgetrc') +os.setenv('PERL5LIB', TEXDIR..'/tlpkg/tlperl/lib') +os.setenv('GS_LIB', TEXDIR..'/tlpkg/tlgs/lib;'..TEXDIR..'/tlpkg/tlgs/fonts') + +if sys then + os.setenv('TEXMFVAR', kpse.var_value('TEXMFSYSVAR')) + os.setenv('TEXMFCONFIG', kpse.var_value('TEXMFSYSCONFIG')) + os.setenv('TEX_SYS_PROG', 'true') +end + +if sys and lfs.isfile(BINDIR..'/'..basename..'.exe') then + command={BINDIR..'/'..basename..'.exe'} +elseif lfs.isfile(BINDIR..'/'..basename..'-bin.exe') then + command={BINDIR..'/'..basename..'-bin.exe'} +elseif lfs.isfile(BINDIR..'/'..basename..'.pl') then + script=BINDIR..'/'..basename..'.pl' + command={perlbin, script} +elseif kpse.find_file(basename..'.pl', 'texmfscripts') then + script=kpse.find_file(basename..'.pl', 'texmfscripts') + command={perlbin, script} +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.. + ': No appropriate script found.\n') +end + +for i=1, #arg do + command[#command+1]=arg[i] +end + +command=fixwin(command) + +--[[ Prepend an additional hyphen to activate this code. +for i=0, #command do + print (command[i]) +end +os.exit(ret) +--]] + +ret=os.spawn(command) +os.exit(ret) diff --git a/Master/bin/win32/pdfthumb.texlua b/Master/bin/win32/pdfthumb.texlua index 5d524a0a66d..45aa25162e5 100755 --- a/Master/bin/win32/pdfthumb.texlua +++ b/Master/bin/win32/pdfthumb.texlua @@ -1,11 +1,11 @@ -#!/usr/bin/env texlua +#! /usr/bin/env texlua --*-Lua-*- --- $Id: .texlua 6969 2008-03-14 22:17:00Z reinhardk $ +-- $Id: tl-w32-wrapper.texlua 7659 2008-04-26 00:33:32Z karl $ --- Copyright (C) 2008 Reinhard Kotucha. +-- Copyright (C) 2007, 2008 Reinhard Kotucha, Norbert Preining. -- You may freely use, modify and/or distribute this file. --- Launch pdfthumb +-- Wrapper for scripts. function fixwin(args_unix) if os.type == 'windows' then @@ -20,11 +20,60 @@ function fixwin(args_unix) end end -kpse.set_program_name('pdfthumb.texlua', 'pdfthumb') +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$', '')) + +sys=false + +if string.find(basename, '-sys$') then + basename=select(1, string.gsub(basename, '-sys$', '')) + sys=true +end + +kpse.set_program_name(filename, basename) +TEXDIR=kpse.var_value('SELFAUTOPARENT') +BINDIR=kpse.var_value('SELFAUTOLOC') -jarfile=kpse.find_file('pp4p.jar', 'texmfscripts') +perlbin=TEXDIR..'/tlpkg/tlperl/bin/perl.exe' -command={'java', '-cp', jarfile, 'de.tu_darmstadt.sp.pdftools.ThumbGen'} +os.setenv('PATH', TEXDIR..'/tlpkg/tlgs/bin;'.. + TEXDIR..'/tlpkg/installer;'.. + os.getenv('PATH')) + +os.setenv('WGETRC', TEXDIR..'/tlpkg/installer/wgetrc') +os.setenv('PERL5LIB', TEXDIR..'/tlpkg/tlperl/lib') +os.setenv('GS_LIB', TEXDIR..'/tlpkg/tlgs/lib;'..TEXDIR..'/tlpkg/tlgs/fonts') + +if sys then + os.setenv('TEXMFVAR', kpse.var_value('TEXMFSYSVAR')) + os.setenv('TEXMFCONFIG', kpse.var_value('TEXMFSYSCONFIG')) + os.setenv('TEX_SYS_PROG', 'true') +end + +if sys and lfs.isfile(BINDIR..'/'..basename..'.exe') then + command={BINDIR..'/'..basename..'.exe'} +elseif lfs.isfile(BINDIR..'/'..basename..'-bin.exe') then + command={BINDIR..'/'..basename..'-bin.exe'} +elseif lfs.isfile(BINDIR..'/'..basename..'.pl') then + script=BINDIR..'/'..basename..'.pl' + command={perlbin, script} +elseif kpse.find_file(basename..'.pl', 'texmfscripts') then + script=kpse.find_file(basename..'.pl', 'texmfscripts') + command={perlbin, script} +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.. + ': No appropriate script found.\n') +end for i=1, #arg do command[#command+1]=arg[i] @@ -32,7 +81,7 @@ end command=fixwin(command) ---[[ prepend an additional hyphen to activate this code +--[[ Prepend an additional hyphen to activate this code. for i=0, #command do print (command[i]) end diff --git a/Master/bin/win32/perltex.texlua b/Master/bin/win32/perltex.texlua new file mode 100755 index 00000000000..45aa25162e5 --- /dev/null +++ b/Master/bin/win32/perltex.texlua @@ -0,0 +1,92 @@ +#! /usr/bin/env texlua +--*-Lua-*- +-- $Id: tl-w32-wrapper.texlua 7659 2008-04-26 00:33:32Z karl $ + +-- Copyright (C) 2007, 2008 Reinhard Kotucha, Norbert Preining. +-- You may freely use, modify and/or distribute this file. + +-- Wrapper for 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$', '')) + +sys=false + +if string.find(basename, '-sys$') then + basename=select(1, string.gsub(basename, '-sys$', '')) + sys=true +end + +kpse.set_program_name(filename, basename) +TEXDIR=kpse.var_value('SELFAUTOPARENT') +BINDIR=kpse.var_value('SELFAUTOLOC') + +perlbin=TEXDIR..'/tlpkg/tlperl/bin/perl.exe' + +os.setenv('PATH', TEXDIR..'/tlpkg/tlgs/bin;'.. + TEXDIR..'/tlpkg/installer;'.. + os.getenv('PATH')) + +os.setenv('WGETRC', TEXDIR..'/tlpkg/installer/wgetrc') +os.setenv('PERL5LIB', TEXDIR..'/tlpkg/tlperl/lib') +os.setenv('GS_LIB', TEXDIR..'/tlpkg/tlgs/lib;'..TEXDIR..'/tlpkg/tlgs/fonts') + +if sys then + os.setenv('TEXMFVAR', kpse.var_value('TEXMFSYSVAR')) + os.setenv('TEXMFCONFIG', kpse.var_value('TEXMFSYSCONFIG')) + os.setenv('TEX_SYS_PROG', 'true') +end + +if sys and lfs.isfile(BINDIR..'/'..basename..'.exe') then + command={BINDIR..'/'..basename..'.exe'} +elseif lfs.isfile(BINDIR..'/'..basename..'-bin.exe') then + command={BINDIR..'/'..basename..'-bin.exe'} +elseif lfs.isfile(BINDIR..'/'..basename..'.pl') then + script=BINDIR..'/'..basename..'.pl' + command={perlbin, script} +elseif kpse.find_file(basename..'.pl', 'texmfscripts') then + script=kpse.find_file(basename..'.pl', 'texmfscripts') + command={perlbin, script} +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.. + ': No appropriate script found.\n') +end + +for i=1, #arg do + command[#command+1]=arg[i] +end + +command=fixwin(command) + +--[[ Prepend an additional hyphen to activate this code. +for i=0, #command do + print (command[i]) +end +os.exit(ret) +--]] + +ret=os.spawn(command) +os.exit(ret) diff --git a/Master/bin/win32/pkfix.texlua b/Master/bin/win32/pkfix.texlua new file mode 100755 index 00000000000..45aa25162e5 --- /dev/null +++ b/Master/bin/win32/pkfix.texlua @@ -0,0 +1,92 @@ +#! /usr/bin/env texlua +--*-Lua-*- +-- $Id: tl-w32-wrapper.texlua 7659 2008-04-26 00:33:32Z karl $ + +-- Copyright (C) 2007, 2008 Reinhard Kotucha, Norbert Preining. +-- You may freely use, modify and/or distribute this file. + +-- Wrapper for 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$', '')) + +sys=false + +if string.find(basename, '-sys$') then + basename=select(1, string.gsub(basename, '-sys$', '')) + sys=true +end + +kpse.set_program_name(filename, basename) +TEXDIR=kpse.var_value('SELFAUTOPARENT') +BINDIR=kpse.var_value('SELFAUTOLOC') + +perlbin=TEXDIR..'/tlpkg/tlperl/bin/perl.exe' + +os.setenv('PATH', TEXDIR..'/tlpkg/tlgs/bin;'.. + TEXDIR..'/tlpkg/installer;'.. + os.getenv('PATH')) + +os.setenv('WGETRC', TEXDIR..'/tlpkg/installer/wgetrc') +os.setenv('PERL5LIB', TEXDIR..'/tlpkg/tlperl/lib') +os.setenv('GS_LIB', TEXDIR..'/tlpkg/tlgs/lib;'..TEXDIR..'/tlpkg/tlgs/fonts') + +if sys then + os.setenv('TEXMFVAR', kpse.var_value('TEXMFSYSVAR')) + os.setenv('TEXMFCONFIG', kpse.var_value('TEXMFSYSCONFIG')) + os.setenv('TEX_SYS_PROG', 'true') +end + +if sys and lfs.isfile(BINDIR..'/'..basename..'.exe') then + command={BINDIR..'/'..basename..'.exe'} +elseif lfs.isfile(BINDIR..'/'..basename..'-bin.exe') then + command={BINDIR..'/'..basename..'-bin.exe'} +elseif lfs.isfile(BINDIR..'/'..basename..'.pl') then + script=BINDIR..'/'..basename..'.pl' + command={perlbin, script} +elseif kpse.find_file(basename..'.pl', 'texmfscripts') then + script=kpse.find_file(basename..'.pl', 'texmfscripts') + command={perlbin, script} +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.. + ': No appropriate script found.\n') +end + +for i=1, #arg do + command[#command+1]=arg[i] +end + +command=fixwin(command) + +--[[ Prepend an additional hyphen to activate this code. +for i=0, #command do + print (command[i]) +end +os.exit(ret) +--]] + +ret=os.spawn(command) +os.exit(ret) diff --git a/Master/bin/win32/ppower4.texlua b/Master/bin/win32/ppower4.texlua index 06e6ff454ff..45aa25162e5 100755 --- a/Master/bin/win32/ppower4.texlua +++ b/Master/bin/win32/ppower4.texlua @@ -1,11 +1,11 @@ -#!/usr/bin/env texlua +#! /usr/bin/env texlua --*-Lua-*- --- $Id$ +-- $Id: tl-w32-wrapper.texlua 7659 2008-04-26 00:33:32Z karl $ --- Copyright (C) 2008 Reinhard Kotucha. +-- Copyright (C) 2007, 2008 Reinhard Kotucha, Norbert Preining. -- You may freely use, modify and/or distribute this file. --- Launch ppower4 +-- Wrapper for scripts. function fixwin(args_unix) if os.type == 'windows' then @@ -20,11 +20,60 @@ function fixwin(args_unix) end end -kpse.set_program_name('ppower4.texlua', 'ppower4') +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$', '')) + +sys=false + +if string.find(basename, '-sys$') then + basename=select(1, string.gsub(basename, '-sys$', '')) + sys=true +end + +kpse.set_program_name(filename, basename) +TEXDIR=kpse.var_value('SELFAUTOPARENT') +BINDIR=kpse.var_value('SELFAUTOLOC') -jarfile=kpse.find_file('pp4p.jar', 'texmfscripts') +perlbin=TEXDIR..'/tlpkg/tlperl/bin/perl.exe' -command={'java', '-jar', jarfile} +os.setenv('PATH', TEXDIR..'/tlpkg/tlgs/bin;'.. + TEXDIR..'/tlpkg/installer;'.. + os.getenv('PATH')) + +os.setenv('WGETRC', TEXDIR..'/tlpkg/installer/wgetrc') +os.setenv('PERL5LIB', TEXDIR..'/tlpkg/tlperl/lib') +os.setenv('GS_LIB', TEXDIR..'/tlpkg/tlgs/lib;'..TEXDIR..'/tlpkg/tlgs/fonts') + +if sys then + os.setenv('TEXMFVAR', kpse.var_value('TEXMFSYSVAR')) + os.setenv('TEXMFCONFIG', kpse.var_value('TEXMFSYSCONFIG')) + os.setenv('TEX_SYS_PROG', 'true') +end + +if sys and lfs.isfile(BINDIR..'/'..basename..'.exe') then + command={BINDIR..'/'..basename..'.exe'} +elseif lfs.isfile(BINDIR..'/'..basename..'-bin.exe') then + command={BINDIR..'/'..basename..'-bin.exe'} +elseif lfs.isfile(BINDIR..'/'..basename..'.pl') then + script=BINDIR..'/'..basename..'.pl' + command={perlbin, script} +elseif kpse.find_file(basename..'.pl', 'texmfscripts') then + script=kpse.find_file(basename..'.pl', 'texmfscripts') + command={perlbin, script} +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.. + ': No appropriate script found.\n') +end for i=1, #arg do command[#command+1]=arg[i] @@ -32,7 +81,7 @@ end command=fixwin(command) ---[[ prepend an additional hyphen to activate this code +--[[ Prepend an additional hyphen to activate this code. for i=0, #command do print (command[i]) end diff --git a/Master/bin/win32/ps2eps.texlua b/Master/bin/win32/ps2eps.texlua new file mode 100755 index 00000000000..45aa25162e5 --- /dev/null +++ b/Master/bin/win32/ps2eps.texlua @@ -0,0 +1,92 @@ +#! /usr/bin/env texlua +--*-Lua-*- +-- $Id: tl-w32-wrapper.texlua 7659 2008-04-26 00:33:32Z karl $ + +-- Copyright (C) 2007, 2008 Reinhard Kotucha, Norbert Preining. +-- You may freely use, modify and/or distribute this file. + +-- Wrapper for 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$', '')) + +sys=false + +if string.find(basename, '-sys$') then + basename=select(1, string.gsub(basename, '-sys$', '')) + sys=true +end + +kpse.set_program_name(filename, basename) +TEXDIR=kpse.var_value('SELFAUTOPARENT') +BINDIR=kpse.var_value('SELFAUTOLOC') + +perlbin=TEXDIR..'/tlpkg/tlperl/bin/perl.exe' + +os.setenv('PATH', TEXDIR..'/tlpkg/tlgs/bin;'.. + TEXDIR..'/tlpkg/installer;'.. + os.getenv('PATH')) + +os.setenv('WGETRC', TEXDIR..'/tlpkg/installer/wgetrc') +os.setenv('PERL5LIB', TEXDIR..'/tlpkg/tlperl/lib') +os.setenv('GS_LIB', TEXDIR..'/tlpkg/tlgs/lib;'..TEXDIR..'/tlpkg/tlgs/fonts') + +if sys then + os.setenv('TEXMFVAR', kpse.var_value('TEXMFSYSVAR')) + os.setenv('TEXMFCONFIG', kpse.var_value('TEXMFSYSCONFIG')) + os.setenv('TEX_SYS_PROG', 'true') +end + +if sys and lfs.isfile(BINDIR..'/'..basename..'.exe') then + command={BINDIR..'/'..basename..'.exe'} +elseif lfs.isfile(BINDIR..'/'..basename..'-bin.exe') then + command={BINDIR..'/'..basename..'-bin.exe'} +elseif lfs.isfile(BINDIR..'/'..basename..'.pl') then + script=BINDIR..'/'..basename..'.pl' + command={perlbin, script} +elseif kpse.find_file(basename..'.pl', 'texmfscripts') then + script=kpse.find_file(basename..'.pl', 'texmfscripts') + command={perlbin, script} +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.. + ': No appropriate script found.\n') +end + +for i=1, #arg do + command[#command+1]=arg[i] +end + +command=fixwin(command) + +--[[ Prepend an additional hyphen to activate this code. +for i=0, #command do + print (command[i]) +end +os.exit(ret) +--]] + +ret=os.spawn(command) +os.exit(ret) diff --git a/Master/bin/win32/texcount.texlua b/Master/bin/win32/texcount.texlua new file mode 100755 index 00000000000..45aa25162e5 --- /dev/null +++ b/Master/bin/win32/texcount.texlua @@ -0,0 +1,92 @@ +#! /usr/bin/env texlua +--*-Lua-*- +-- $Id: tl-w32-wrapper.texlua 7659 2008-04-26 00:33:32Z karl $ + +-- Copyright (C) 2007, 2008 Reinhard Kotucha, Norbert Preining. +-- You may freely use, modify and/or distribute this file. + +-- Wrapper for 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$', '')) + +sys=false + +if string.find(basename, '-sys$') then + basename=select(1, string.gsub(basename, '-sys$', '')) + sys=true +end + +kpse.set_program_name(filename, basename) +TEXDIR=kpse.var_value('SELFAUTOPARENT') +BINDIR=kpse.var_value('SELFAUTOLOC') + +perlbin=TEXDIR..'/tlpkg/tlperl/bin/perl.exe' + +os.setenv('PATH', TEXDIR..'/tlpkg/tlgs/bin;'.. + TEXDIR..'/tlpkg/installer;'.. + os.getenv('PATH')) + +os.setenv('WGETRC', TEXDIR..'/tlpkg/installer/wgetrc') +os.setenv('PERL5LIB', TEXDIR..'/tlpkg/tlperl/lib') +os.setenv('GS_LIB', TEXDIR..'/tlpkg/tlgs/lib;'..TEXDIR..'/tlpkg/tlgs/fonts') + +if sys then + os.setenv('TEXMFVAR', kpse.var_value('TEXMFSYSVAR')) + os.setenv('TEXMFCONFIG', kpse.var_value('TEXMFSYSCONFIG')) + os.setenv('TEX_SYS_PROG', 'true') +end + +if sys and lfs.isfile(BINDIR..'/'..basename..'.exe') then + command={BINDIR..'/'..basename..'.exe'} +elseif lfs.isfile(BINDIR..'/'..basename..'-bin.exe') then + command={BINDIR..'/'..basename..'-bin.exe'} +elseif lfs.isfile(BINDIR..'/'..basename..'.pl') then + script=BINDIR..'/'..basename..'.pl' + command={perlbin, script} +elseif kpse.find_file(basename..'.pl', 'texmfscripts') then + script=kpse.find_file(basename..'.pl', 'texmfscripts') + command={perlbin, script} +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.. + ': No appropriate script found.\n') +end + +for i=1, #arg do + command[#command+1]=arg[i] +end + +command=fixwin(command) + +--[[ Prepend an additional hyphen to activate this code. +for i=0, #command do + print (command[i]) +end +os.exit(ret) +--]] + +ret=os.spawn(command) +os.exit(ret) diff --git a/Master/bin/win32/texdoctk.texlua b/Master/bin/win32/texdoctk.texlua index e6d974e19d2..45aa25162e5 100755 --- a/Master/bin/win32/texdoctk.texlua +++ b/Master/bin/win32/texdoctk.texlua @@ -1,8 +1,8 @@ #! /usr/bin/env texlua --*-Lua-*- --- $Id$ +-- $Id: tl-w32-wrapper.texlua 7659 2008-04-26 00:33:32Z karl $ --- Copyright (C) 2007 Reinhard Kotucha, Norbert Preining. +-- Copyright (C) 2007, 2008 Reinhard Kotucha, Norbert Preining. -- You may freely use, modify and/or distribute this file. -- Wrapper for scripts. diff --git a/Master/bin/win32/texindy.texlua b/Master/bin/win32/texindy.texlua index e6d974e19d2..81c8a83940c 100755 --- a/Master/bin/win32/texindy.texlua +++ b/Master/bin/win32/texindy.texlua @@ -2,7 +2,7 @@ --*-Lua-*- -- $Id$ --- Copyright (C) 2007 Reinhard Kotucha, Norbert Preining. +-- Copyright (C) 2007, 2008 Reinhard Kotucha, Norbert Preining. -- You may freely use, modify and/or distribute this file. -- Wrapper for scripts. diff --git a/Master/bin/win32/thumbpdf.texlua b/Master/bin/win32/thumbpdf.texlua index e6d974e19d2..45aa25162e5 100755 --- a/Master/bin/win32/thumbpdf.texlua +++ b/Master/bin/win32/thumbpdf.texlua @@ -1,8 +1,8 @@ #! /usr/bin/env texlua --*-Lua-*- --- $Id$ +-- $Id: tl-w32-wrapper.texlua 7659 2008-04-26 00:33:32Z karl $ --- Copyright (C) 2007 Reinhard Kotucha, Norbert Preining. +-- Copyright (C) 2007, 2008 Reinhard Kotucha, Norbert Preining. -- You may freely use, modify and/or distribute this file. -- Wrapper for scripts. diff --git a/Master/bin/win32/tlmgr.texlua b/Master/bin/win32/tlmgr.texlua index 89c8f854618..45aa25162e5 100755 --- a/Master/bin/win32/tlmgr.texlua +++ b/Master/bin/win32/tlmgr.texlua @@ -1,8 +1,8 @@ #! /usr/bin/env texlua --*-Lua-*- --- $Id: xindy.texlua 7484 2008-04-18 05:44:51Z vvv $ +-- $Id: tl-w32-wrapper.texlua 7659 2008-04-26 00:33:32Z karl $ --- Copyright (C) 2007 Reinhard Kotucha, Norbert Preining. +-- Copyright (C) 2007, 2008 Reinhard Kotucha, Norbert Preining. -- You may freely use, modify and/or distribute this file. -- Wrapper for scripts. diff --git a/Master/bin/win32/updmap-sys.texlua b/Master/bin/win32/updmap-sys.texlua index e6d974e19d2..81c8a83940c 100755 --- a/Master/bin/win32/updmap-sys.texlua +++ b/Master/bin/win32/updmap-sys.texlua @@ -2,7 +2,7 @@ --*-Lua-*- -- $Id$ --- Copyright (C) 2007 Reinhard Kotucha, Norbert Preining. +-- Copyright (C) 2007, 2008 Reinhard Kotucha, Norbert Preining. -- You may freely use, modify and/or distribute this file. -- Wrapper for scripts. diff --git a/Master/bin/win32/updmap.texlua b/Master/bin/win32/updmap.texlua index e6d974e19d2..81c8a83940c 100755 --- a/Master/bin/win32/updmap.texlua +++ b/Master/bin/win32/updmap.texlua @@ -2,7 +2,7 @@ --*-Lua-*- -- $Id$ --- Copyright (C) 2007 Reinhard Kotucha, Norbert Preining. +-- Copyright (C) 2007, 2008 Reinhard Kotucha, Norbert Preining. -- You may freely use, modify and/or distribute this file. -- Wrapper for scripts. diff --git a/Master/bin/win32/vpe.texlua b/Master/bin/win32/vpe.texlua new file mode 100755 index 00000000000..45aa25162e5 --- /dev/null +++ b/Master/bin/win32/vpe.texlua @@ -0,0 +1,92 @@ +#! /usr/bin/env texlua +--*-Lua-*- +-- $Id: tl-w32-wrapper.texlua 7659 2008-04-26 00:33:32Z karl $ + +-- Copyright (C) 2007, 2008 Reinhard Kotucha, Norbert Preining. +-- You may freely use, modify and/or distribute this file. + +-- Wrapper for 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$', '')) + +sys=false + +if string.find(basename, '-sys$') then + basename=select(1, string.gsub(basename, '-sys$', '')) + sys=true +end + +kpse.set_program_name(filename, basename) +TEXDIR=kpse.var_value('SELFAUTOPARENT') +BINDIR=kpse.var_value('SELFAUTOLOC') + +perlbin=TEXDIR..'/tlpkg/tlperl/bin/perl.exe' + +os.setenv('PATH', TEXDIR..'/tlpkg/tlgs/bin;'.. + TEXDIR..'/tlpkg/installer;'.. + os.getenv('PATH')) + +os.setenv('WGETRC', TEXDIR..'/tlpkg/installer/wgetrc') +os.setenv('PERL5LIB', TEXDIR..'/tlpkg/tlperl/lib') +os.setenv('GS_LIB', TEXDIR..'/tlpkg/tlgs/lib;'..TEXDIR..'/tlpkg/tlgs/fonts') + +if sys then + os.setenv('TEXMFVAR', kpse.var_value('TEXMFSYSVAR')) + os.setenv('TEXMFCONFIG', kpse.var_value('TEXMFSYSCONFIG')) + os.setenv('TEX_SYS_PROG', 'true') +end + +if sys and lfs.isfile(BINDIR..'/'..basename..'.exe') then + command={BINDIR..'/'..basename..'.exe'} +elseif lfs.isfile(BINDIR..'/'..basename..'-bin.exe') then + command={BINDIR..'/'..basename..'-bin.exe'} +elseif lfs.isfile(BINDIR..'/'..basename..'.pl') then + script=BINDIR..'/'..basename..'.pl' + command={perlbin, script} +elseif kpse.find_file(basename..'.pl', 'texmfscripts') then + script=kpse.find_file(basename..'.pl', 'texmfscripts') + command={perlbin, script} +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.. + ': No appropriate script found.\n') +end + +for i=1, #arg do + command[#command+1]=arg[i] +end + +command=fixwin(command) + +--[[ Prepend an additional hyphen to activate this code. +for i=0, #command do + print (command[i]) +end +os.exit(ret) +--]] + +ret=os.spawn(command) +os.exit(ret) diff --git a/Master/bin/win32/xindy.texlua b/Master/bin/win32/xindy.texlua index e6d974e19d2..81c8a83940c 100755 --- a/Master/bin/win32/xindy.texlua +++ b/Master/bin/win32/xindy.texlua @@ -2,7 +2,7 @@ --*-Lua-*- -- $Id$ --- Copyright (C) 2007 Reinhard Kotucha, Norbert Preining. +-- Copyright (C) 2007, 2008 Reinhard Kotucha, Norbert Preining. -- You may freely use, modify and/or distribute this file. -- Wrapper for scripts. |