diff options
author | Karl Berry <karl@freefriends.org> | 2020-02-21 22:53:49 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-02-21 22:53:49 +0000 |
commit | 22ea71d84d3cd13a2523c2ad951f22eff56ea91f (patch) | |
tree | c2a2c69a0ff61a8d55d468f6cf4a1b319bdecee8 /Master/texmf-dist/scripts/texdoc/texdoc.tlu | |
parent | ea5346c2be7f21aaa64e65600af6b7e61f9e2a78 (diff) |
texdoc (20feb20)
git-svn-id: svn://tug.org/texlive/trunk@53859 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/texdoc/texdoc.tlu')
-rwxr-xr-x | Master/texmf-dist/scripts/texdoc/texdoc.tlu | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Master/texmf-dist/scripts/texdoc/texdoc.tlu b/Master/texmf-dist/scripts/texdoc/texdoc.tlu index bc2139435a3..e16f2e4eb1a 100755 --- a/Master/texmf-dist/scripts/texdoc/texdoc.tlu +++ b/Master/texmf-dist/scripts/texdoc/texdoc.tlu @@ -16,13 +16,15 @@ kpse.set_program_name(arg[-1], 'texdoc') -- get realpath of this file local function realpath(p) if os.type == 'unix' then - local h = io.popen(string.format("realpath '%s'", p)) - local r = h:read('*a') - h:close() - return r:gsub('\n$', '') - else - return '' + local e = os.execute('which realpath >/dev/null 2>&1') + if e == 0 then + local h = io.popen(string.format("realpath '%s'", p)) + local r = h:read('*a') + h:close() + return r:gsub('\n$', '') + end end + return '' end local file = realpath(arg[0]) |