Skip to content

Commit

Permalink
TeX : nfssext : fontscripts : add date/time info to auto-generated fi…
Browse files Browse the repository at this point in the history
…les.
  • Loading branch information
Clea F. Rees committed Jan 4, 2025
1 parent da155f4 commit bd9602a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
7 changes: 4 additions & 3 deletions fontscripts/fntbuild-check.lua
Original file line number Diff line number Diff line change
@@ -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
-------------------------------------------------
Expand Down Expand Up @@ -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)))
Expand Down Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions fontscripts/fntbuild-doc.lua
Original file line number Diff line number Diff line change
@@ -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
-------------------------------------------------
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)))
Expand Down

0 comments on commit bd9602a

Please sign in to comment.