texlive.combine: generate language.dat.lua

This commit is contained in:
Vincenzo Mantova 2021-07-04 11:47:33 +01:00
parent 7d12a7dde9
commit 6603342bb6

View File

@ -137,12 +137,20 @@ in (buildEnv {
# pick up the footer (for language.def)
+ "/^%%% No changes may be made beyond this point.$/,$p;\n"
);
scriptLua =
writeText "hyphens.lua.sed" (
"1{ s/^(-- Generated by .*)$/\\1, modified by texlive.combine/; p; }\n"
+ "2,/^-- END of language.us.lua/p;\n"
+ lib.concatMapStrings (pname: section "^-- from ${pname}:$" "^}$|^-- from") pnames
+ "$p;\n"
);
in ''
(
cd ./share/texmf/tex/generic/config/
for fname in language.{dat,def}; do
[[ -e "$fname" ]] && sed -E -n -f '${script}' -i "$fname"
done
[[ -e language.dat.lua ]] && sed -E -n -f '${scriptLua}' -i language.dat.lua
)
'') +