Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

avoid writing tex for #1412 #1466

Merged
merged 9 commits into from
Sep 15, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions required/tools/build.lua
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,28 @@ checkconfigs = {"build","config-TU","config-legacy","config-search"}

-- Load the common settings for the LaTeX2e repo
dofile (maindir .. "/build-config.lua")

-- special code to handle .tex

function unpack(sources, sourcedirs)
local errorlevel = dep_install(unpackdeps)
if errorlevel ~= 0 then
return errorlevel
end
errorlevel = bundleunpack(sourcedirs, sources)
if errorlevel ~= 0 then
return errorlevel
end
texio.write(" * Renaming rename-to-empty-base.tex to .tex")
errorlevel = ren(unpackdir,"rename-to-empty-base.tex",".tex")
if errorlevel ~= 0 then
return errorlevel
end
for _,i in ipairs(installfiles) do
errorlevel = cp(i, unpackdir, localdir)
if errorlevel ~= 0 then
return errorlevel
end
end
return 0
end
davidcarlisle marked this conversation as resolved.
Show resolved Hide resolved
8 changes: 3 additions & 5 deletions required/tools/tools.ins
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,10 @@ given in the file `manifest.txt'.

\Msg{}
\Msg{* Finally trying to make a file `.tex'.}
\Msg{* (Placed at the end of this run, as this}
\Msg{* may fail on some operating systems.)}
\Msg{* TeX may be blocked from writing .tex so writing rename-to-empty-base.tex}
\Msg{* Rename that file to .tex after the docstrip generation}
davidcarlisle marked this conversation as resolved.
Show resolved Hide resolved

\let\oldopenout\openout
\def\openout{\batchmode\immediate\oldopenout}

\generate{\file{.tex}{\from{fileerr.dtx}{return}}}
\generate{\file{rename-to-empty-base.tex}{\from{fileerr.dtx}{return}}}

\endbatchfile
Loading