summaryrefslogtreecommitdiff
path: root/Master/bin/win32/updmap-sys.texlua
blob: eb9791220099a2e3697827f923e364e51ac8e3e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/env texlua
--*-Lua-*-

--[[ $Id$
Copyright (C) 2007 Reinhard Kotucha.
You may freely use, modify and/or distribute this file.

Originally written as a Bourne shell script by Thomas Esser,
ported to texlua by Reinhard Kotucha.

Wrapper script for updmap-sys. ]]

kpse.set_program_name('texlua')

TEXDIR=kpse.var_value('SELFAUTOPARENT')

perl=TEXDIR .. '/tlpkg/tlperl/bin/perl.exe'
PERL5LIB=TEXDIR .. '/tlpkg/tlperl/lib'
os.setenv('PERL5LIB', PERL5LIB)

updmap_script=kpse.find_file("updmap.pl", "texmfscripts")

os.setenv('TEXMFVAR', kpse.var_value('TEXMFSYSVAR'))
os.setenv('TEXMFCONFIG', kpse.var_value('TEXMFSYSCONFIG'))

updmap=perl .. ' ' .. updmap_script

for i=1, #arg do
   updmap=updmap .. ' ' .. arg[i]
end

os.exec(updmap);