2020-06-15 03:52:16 +02:00
|
|
|
#!/bin/sh
|
2020-07-11 18:47:17 +02:00
|
|
|
luametatex --credits >/dev/null || exit 1
|
|
|
|
l3build install
|
2020-07-09 14:53:17 +02:00
|
|
|
ENGINE="$(which luametatex$EXE_EXT)"
|
2020-06-15 03:52:16 +02:00
|
|
|
ENGINE_DIR="$(dirname "$ENGINE")"
|
|
|
|
REPO="$(pwd)"
|
|
|
|
cd "$(dirname "$ENGINE")"
|
2020-07-11 18:47:17 +02:00
|
|
|
ln -fs luametatex$EXE_EXT luametaplain$EXE_EXT
|
|
|
|
ln -fs luametatex$EXE_EXT luametalatex$EXE_EXT
|
|
|
|
ln -fs luametatex$EXE_EXT luametalatex-dev$EXE_EXT
|
|
|
|
ln -fs "$REPO/luametaplain.lua" luametaplain.lua
|
|
|
|
ln -fs "$REPO/luametalatex.lua" luametalatex.lua
|
|
|
|
ln -fs "$REPO/luametalatex-dev.lua" luametalatex-dev.lua
|
|
|
|
cd "$(kpsewhich -var-value TEXMFLOCAL)"
|
2020-06-15 03:52:16 +02:00
|
|
|
mkdir -p web2c
|
2020-07-11 18:47:17 +02:00
|
|
|
if kpsewhich -var-value LUAINPUTS.luametalatex > /dev/null
|
|
|
|
then
|
|
|
|
echo 'LUAINPUTS for luametalatex already set. In case of issues, please verify that the entries are correct.'
|
|
|
|
else
|
|
|
|
cat >> web2c/texmf.cnf << "EOF"
|
2020-07-10 22:19:43 +02:00
|
|
|
TEXINPUTS.luametaplain = $TEXMFDOTDIR;$TEXMF/tex/{luametaplain,luametatex,luatex,plain,generic,}//
|
2020-06-15 03:52:16 +02:00
|
|
|
TEXINPUTS.luametalatex = $TEXMFDOTDIR;$TEXMF/tex/{luametalatex,lualatex,latex,luametatex,luatex,generic,}//
|
|
|
|
TEXINPUTS.luametalatex-dev= $TEXMFDOTDIR;$TEXMF/tex/{luametalatex,latex-dev,lualatex,latex,luametatex,luatex,generic,}//
|
|
|
|
|
2020-07-10 22:19:43 +02:00
|
|
|
LUAINPUTS.luametaplain = $TEXMFDOTDIR;$TEXMF/scripts/{$progname,$engine,}/{lua,}//;$TEXMF/tex/{luametaplain,luametatex,luatex,plain,generic,}//
|
2020-06-15 03:52:16 +02:00
|
|
|
LUAINPUTS.luametalatex = $TEXMFDOTDIR;$TEXMF/scripts/{$progname,$engine,}/{lua,}//;$TEXMF/tex/{luametalatex,lualatex,latex,luametatex,luatex,generic,}//
|
|
|
|
LUAINPUTS.luametalatex-dev= $TEXMFDOTDIR;$TEXMF/scripts/{$progname,$engine,}/{lua,}//;$TEXMF/tex/{luametalatex,latex-dev,lualatex,latex,luametatex,luatex,generic,}//
|
|
|
|
EOF
|
2020-07-11 18:47:17 +02:00
|
|
|
fi
|
2020-06-15 03:52:16 +02:00
|
|
|
|
2020-07-11 18:47:17 +02:00
|
|
|
if fmtutil-user --listcfg|grep -q '^luametalatex '
|
|
|
|
then
|
|
|
|
echo 'luametalatex format already known. In case of issues, please verify that the entries are correct.'
|
|
|
|
else
|
|
|
|
cat >> web2c/fmtutil.cnf << "EOF"
|
|
|
|
luametaplain luametatex language.dat,language.dat.lua --lua="$(kpsewhich luametaplain.lua)" luametaplain.ini
|
2020-06-15 03:52:16 +02:00
|
|
|
luametalatex luametatex language.dat,language.dat.lua --lua="$(kpsewhich luametalatex.lua)" luametalatex.ini
|
|
|
|
luametalatex-dev luametatex language.dat,language.dat.lua --lua="$(kpsewhich luametalatex-dev.lua)" luametalatex.ini
|
|
|
|
EOF
|
2020-07-11 18:47:17 +02:00
|
|
|
fi
|
|
|
|
|
2020-06-15 03:52:16 +02:00
|
|
|
echo INSTALLED
|