Skip to content

Commit

Permalink
Apply TeX Live hotfix from gitlab/islandoftex/images/texlive/!34
Browse files Browse the repository at this point in the history
Co-authored-by: Max Chernoff <49086429+gucci-on-fleek@users.noreply.github.com>

See also:
- https://gitlab.com/islandoftex/images/texlive/-/issues/30#note_1369931901
- https://gitlab.com/islandoftex/images/texlive/-/merge_requests/34
  • Loading branch information
Witiko committed Apr 27, 2023
1 parent cb8892b commit 70bd77b
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions Dockerfile
Expand Up @@ -78,8 +78,18 @@ cp ${BUILD_DIR}/markdownthemewitiko_tilde.sty ${INSTALL_DIR}/tex/latex/
mkdir -p ${INSTALL_DIR}/tex/context/third/markdown/
cp ${BUILD_DIR}/t-markdown.tex ${INSTALL_DIR}/tex/context/third/markdown/

# Generate the ConTeXt file database
# Generate the ConTeXt file database, applying the hotfix from https://gitlab.com/islandoftex/images/texlive/-/issues/30#note_1369931901
if [ -e /usr/bin/mtxrun.lua ]
then
sed -i '/package.loaded\["data-ini"\]/a if os.selfpath then environment.ownbin=lfs.symlinktarget(os.selfpath..io.fileseparator..os.selfname);environment.ownpath=environment.ownbin:match("^.*"..io.fileseparator) else environment.ownpath=kpse.new("luatex"):var_value("SELFAUTOLOC");environment.ownbin=environment.ownpath..io.fileseparator..(arg[-2] or arg[-1] or arg[0] or "luatex"):match("[^"..io.fileseparator.."]*$") end' /usr/bin/mtxrun.lua
fi
mtxrun --generate
if [ -e /usr/bin/mtxrun.lua ]
then
texlua /usr/bin/mtxrun.lua --luatex --generate
context --make
context --luatex --make
fi

# Reindex the TeX directory structure
texhash
Expand Down Expand Up @@ -133,8 +143,18 @@ apt-get -qy clean
apt-get -qy autoremove --purge
rm -rf ${AUXILIARY_FILES}

# Generate the ConTeXt file database
# Generate the ConTeXt file database, applying the hotfix from https://gitlab.com/islandoftex/images/texlive/-/issues/30#note_1369931901
if [ -e /usr/bin/mtxrun.lua ]
then
sed -i '/package.loaded\["data-ini"\]/a if os.selfpath then environment.ownbin=lfs.symlinktarget(os.selfpath..io.fileseparator..os.selfname);environment.ownpath=environment.ownbin:match("^.*"..io.fileseparator) else environment.ownpath=kpse.new("luatex"):var_value("SELFAUTOLOC");environment.ownbin=environment.ownpath..io.fileseparator..(arg[-2] or arg[-1] or arg[0] or "luatex"):match("[^"..io.fileseparator.."]*$") end' /usr/bin/mtxrun.lua
fi
mtxrun --generate
if [ -e /usr/bin/mtxrun.lua ]
then
texlua /usr/bin/mtxrun.lua --luatex --generate
context --make
context --luatex --make
fi

# Reindex the TeX directory structure
texhash
Expand Down

0 comments on commit 70bd77b

Please sign in to comment.