summaryrefslogtreecommitdiff
path: root/Master/bin/win32
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2018-06-20 03:55:23 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2018-06-20 03:55:23 +0000
commit2b66ce22aa97a5a4ef8478f2617ea3aef586c7be (patch)
tree1105bb11e3fca3716c6549bf9a13929eebff0618 /Master/bin/win32
parentd76f3f3f17d21d19a829c04bd35fec88ac835087 (diff)
support scripts in trees other than TEXMFDIST
git-svn-id: svn://tug.org/texlive/trunk@48059 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/bin/win32')
-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