Added simple build.lua and improve install.lua
This commit is contained in:
parent
c183f5744d
commit
953fa084bc
8
build.lua
Normal file
8
build.lua
Normal file
@ -0,0 +1,8 @@
|
||||
#!/use/bin/env texlua
|
||||
|
||||
module = "luametalatex"
|
||||
|
||||
tdsroot = "luametatex" -- Would be luametalatex but we use the same files for luametaplain
|
||||
|
||||
installfiles = {"luametalatex*.lua", "luametaplain*.lua"}
|
||||
sourcefiles = {"*.lua"}
|
49
install.sh
49
install.sh
@ -1,33 +1,23 @@
|
||||
#!/bin/sh
|
||||
luametatex --credits >/dev/null || exit 1
|
||||
l3build install
|
||||
ENGINE="$(which luametatex$EXE_EXT)"
|
||||
ENGINE_DIR="$(dirname "$ENGINE")"
|
||||
REPO="$(pwd)"
|
||||
cd "$(dirname "$ENGINE")"
|
||||
ln -s luametatex$EXE_EXT luametaplain$EXE_EXT
|
||||
ln -s luametatex$EXE_EXT luametalatex$EXE_EXT
|
||||
ln -s luametatex$EXE_EXT luametalatex-dev$EXE_EXT
|
||||
ln -s "$REPO/luametaplain.lua" .
|
||||
ln -s "$REPO/luametalatex.lua" .
|
||||
ln -s "$REPO/luametalatex-dev.lua" .
|
||||
while [ ! -d texmf ] && [ ! -d texmf-local ]
|
||||
do
|
||||
LASTDIR="$(pwd)"
|
||||
cd ..
|
||||
if [ "$(pwd)" == "$LASTDIR" ]
|
||||
then
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
if [ -d texmf ]
|
||||
then cd texmf
|
||||
else cd texmf-local
|
||||
fi
|
||||
mkdir -p tex/luameta{plain,latex{,-dev}}
|
||||
ln -s "$REPO" tex/luametaplain/base
|
||||
ln -s "$REPO" tex/luametalatex/base
|
||||
ln -s "$REPO" tex/luametalatex-dev/base
|
||||
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)"
|
||||
mkdir -p web2c
|
||||
cat >> web2c/texmf.cnf << "EOF"
|
||||
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"
|
||||
TEXINPUTS.luametaplain = $TEXMFDOTDIR;$TEXMF/tex/{luametaplain,luametatex,luatex,plain,generic,}//
|
||||
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,}//
|
||||
@ -36,10 +26,17 @@ LUAINPUTS.luametaplain = $TEXMFDOTDIR;$TEXMF/scripts/{$progname,$engine,}/{lu
|
||||
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
|
||||
fi
|
||||
|
||||
cat >> web2c/fmtutil.cnf << "EOF"
|
||||
luametaplain luametatex language.dat,language.dat.lua --lua="$(kpsewhich luametalatex.lua)" luametaplain.ini
|
||||
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
|
||||
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
|
||||
fi
|
||||
|
||||
echo INSTALLED
|
||||
|
Loading…
Reference in New Issue
Block a user