From bd9602a4ed64dbebef6df774304b3479a1b1d5ff Mon Sep 17 00:00:00 2001 From: "Clea F. Rees" Date: Sat, 4 Jan 2025 22:18:27 +0000 Subject: [PATCH] TeX : nfssext : fontscripts : add date/time info to auto-generated files. --- fontscripts/fntbuild-check.lua | 7 ++++--- fontscripts/fntbuild-doc.lua | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/fontscripts/fntbuild-check.lua b/fontscripts/fntbuild-check.lua index bc4b73c..50b54e2 100755 --- a/fontscripts/fntbuild-check.lua +++ b/fontscripts/fntbuild-check.lua @@ -1,4 +1,4 @@ --- $Id: fntbuild-check.lua 10695 2024-12-23 07:12:11Z cfrees $ +-- $Id: fntbuild-check.lua 10715 2025-01-04 22:18:20Z cfrees $ ------------------------------------------------- -- fntbuild-check ------------------------------------------------- @@ -140,13 +140,13 @@ function fnt_test (fntpkgname,fds,content,maps,fdsdir) coll = maps .. "\n\\usepackage{" .. fntpkgname .. "}\n\\begin{document}\n\\START\n" .. coll .. "\n\\END\n\\end{document}\n" end -- coll = maps .. "\n\\begin{document}\n\\START\n" .. coll .. "\n\\END\n\\end{document}\n" - local new_content = "%% Do not edit this file. It is generated by l3build and changes will be overwritten.\n" .. string.gsub(content, "\nSAMP *\n", coll) + local new_content = "%% Do not edit this file as changes will be overwritten.\n%% It was generated by l3build on " .. os.date("%Y-%M-%d %H:%m:%S") .. ".\n" .. string.gsub(content, "\nSAMP *\n", coll) local f = assert(io.open(targfile,"w")) -- this somehow removes the second value returned by string.gsub?? f:write((string.gsub(new_content,"\n",os_newline_cp))) f:close() if yy == 1 then - new_content = "%% Do not edit this file. It is generated by l3build and changes will be overwritten.\n" .. string.gsub(content, "\nSAMP *\n", collly) + new_content = "%% Do not edit this file as changes will be overwritten.\n%% It was generated by l3build on " .. os.date("%Y-%M-%d %H:%m:%S") .. ".\n" .. string.gsub(content, "\nSAMP *\n", collly) local f = assert(io.open(targfilely,"w")) -- this somehow removes the second value returned by string.gsub?? f:write((string.gsub(new_content,"\n",os_newline_cp))) @@ -340,6 +340,7 @@ function checkinit_hook () if not fileexists(fnttestdir .. "/" .. filename) then print("Skipping test creation.\n") else + print("Creating (additional) test file(s).\n") local errorlevel = cp(filename,fnttestdir,unpackdir) -- local errorlevel = ren(unpackdir, filename, targname) if errorlevel ~= 0 then diff --git a/fontscripts/fntbuild-doc.lua b/fontscripts/fntbuild-doc.lua index 1b295a6..219d487 100755 --- a/fontscripts/fntbuild-doc.lua +++ b/fontscripts/fntbuild-doc.lua @@ -1,4 +1,4 @@ --- $Id: fntbuild-doc.lua 10659 2024-11-21 06:49:20Z cfrees $ +-- $Id: fntbuild-doc.lua 10715 2025-01-04 22:18:20Z cfrees $ ------------------------------------------------- -- fntbuild-doc ------------------------------------------------- @@ -28,6 +28,7 @@ function docinit_hook () if not fileexists(fnttestdir .. "/" .. filename) then print("Skipping font tables.\n") else + print("Creating font tables ...\n") local errorlevel = cp(filename,fnttestdir,unpackdir) -- local errorlevel = ren(unpackdir, filename, targname) if errorlevel ~= 0 then @@ -61,7 +62,7 @@ function docinit_hook () maps = "\n\\input{ly1enc.def}\n" .. maps end coll = maps .. "\n\\begin{document}\n" .. coll .. "\n\\end{document}\n" - local new_content = "%% Do not edit this file. It is generated by l3build and changes will be overwritten.\n" .. string.gsub(content, "\n\\endinput *\n", coll) + local new_content = "%% Do not edit this file as changes will be overwritten.\n%% It was generated by l3build on " .. os.date("%Y-%M-%d %H:%m:%S") .. ".\n" .. string.gsub(content, "\n\\endinput *\n", coll) local f = assert(io.open(targfile,"w")) -- this somehow removes the second value returned by string.gsub?? f:write((string.gsub(new_content,"\n",os_newline_cp)))