summaryrefslogtreecommitdiff
path: root/scripts/mkimport
diff options
context:
space:
mode:
authorPhilipp Gesang <phg@phi-gamma.net>2015-12-12 15:09:40 +0100
committerPhilipp Gesang <phg@phi-gamma.net>2015-12-12 15:09:40 +0100
commit074afaccd8cfbdbd7ab4a87fb097b9a93c535896 (patch)
treeb8c5889d944cdcf9e0d12c335d0933df15fe53d7 /scripts/mkimport
parentd658f469849da9927974fb0fde72ccd2bd7e4331 (diff)
downloadluaotfload-074afaccd8cfbdbd7ab4a87fb097b9a93c535896.tar.gz
[mkimport] include MD5 hash with file scope info
Diffstat (limited to 'scripts/mkimport')
-rwxr-xr-xscripts/mkimport13
1 files changed, 7 insertions, 6 deletions
diff --git a/scripts/mkimport b/scripts/mkimport
index 9d443ea..e5fa723 100755
--- a/scripts/mkimport
+++ b/scripts/mkimport
@@ -39,6 +39,7 @@ assert (utilities and utilities.merger and utilities.merger.compact
local filedirname = file.dirname
local fileiswritable = file.is_writable
local ioloaddata = io.loaddata
+local iosavedata = io.savedata
local iopopen = io.popen
local iowrite = io.write
local lfschdir = lfs.chdir
@@ -810,7 +811,7 @@ local luaotfload_header = [==[
build %s by %s@%s
-------------------------------------------------------------------------------
- © %s Hans Hagen / Pragma ADE
+ © %s PRAGMA ADE / ConTeXt Development Team
The code in this file is provided under the GPL v2.0 license. See the
file COPYING in the Luaotfload repository for details.
@@ -848,7 +849,7 @@ local make_header = function (files)
end
-local scope_start = "\ndo --- [luaotfload, %s scope for “%s”] ---\n\n"
+local scope_start = "\ndo --- [luaotfload, %s scope for “%s” %s] ---\n\n"
local scope_stop = "\nend --- [luaotfload, %s scope for “%s”] ---\n\n"
local luaotfload_modeline = "\n--- vim:ft=lua:sw=2:ts=8:et:tw=79\n"
@@ -861,12 +862,12 @@ local assemble_fontloader = function (tgt, dst)
local cur = required [i]
local subdir, ourname = derive_ourname (cur, kind_merged)
local ourpath = file.join (fontloader_subdir, subdir, ourname)
- local data = io.loaddata (ourpath)
+ local data = ioloaddata (ourpath)
if not data then
bad ("file “%s” cannot be loaded from “%s”", ourname, ourpath)
return false
end
- sequence[#sequence + 1] = stringformat (scope_start, tgt, cur)
+ sequence[#sequence + 1] = stringformat (scope_start, tgt, cur, md5sumhexa (data))
sequence[#sequence + 1] = compact (data)
sequence[#sequence + 1] = stringformat (scope_stop , tgt, cur)
end
@@ -878,10 +879,10 @@ local assemble_fontloader = function (tgt, dst)
bad ("packaging result not well-formed")
bad ("error message: “%s”", err)
bad ("dumping to fontloader-junk.lua")
- io.savedata ("fontloader-junk.lua", raw)
+ iosavedata ("fontloader-junk.lua", raw)
return false
end
- io.savedata (dst, raw)
+ iosavedata (dst, raw)
status ("amalgamated %d files, written to “%s”.",
#required, dst)
return dst