summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
Diffstat (limited to 'Master')
-rwxr-xr-xMaster/bin/win32/runscript.tlu11
1 files changed, 10 insertions, 1 deletions
diff --git a/Master/bin/win32/runscript.tlu b/Master/bin/win32/runscript.tlu
index 729293ea579..6a9d2cc398e 100755
--- a/Master/bin/win32/runscript.tlu
+++ b/Master/bin/win32/runscript.tlu
@@ -267,6 +267,9 @@ local docstr = [[
2018/04/06
- introduce a new function is_64bit_windows_os() to
check Windows OS.
+ 2018/06/20
+ - support also scripts in trees other than TEXMFDIST:
+ https://tug.org/pipermail/tex-live/2018-June/041922.html
]]
-- HELPER SUBROUTINES --
@@ -767,8 +770,14 @@ if not ARGV then
os.setenv('TEXMF', TEXMFDIST)
local extlist = '.tlu;.texlua;.pl;.lua;.rb;.py;.tcl;.jar;.vbs;.js;.bat;.cmd;\0'
local progfullname = search_path(progname, BINDIR, '.tlu;.bat;.cmd') or
- assert(find_texmfscript(progname, extlist))
+ find_texmfscript(progname, extlist)
os.setenv('TEXMF', nil)
+ if progfullname == nil then
+-- scripts in $TEXMFLOCAL etc. can't be found without the following
+-- line !!
+ kpse.set_program_name('runscript')
+ progfullname = assert(find_texmfscript(progname, extlist))
+ end
local ext = string.match(string.lower(progfullname), '%.[^\\/.]*$') or ''
if (ext == '.lua') or (ext == '.tlu') or (ext == '.texlua') then -- lua script
arg[0] = progfullname