From: Hironori Kitagawa Date: Wed, 5 Oct 2022 23:18:09 +0000 (+0900) Subject: lualibs-gzip to lualibs-util-zip X-Git-Tag: 20221213.0~9 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=1e1611d59c35ab97e9e76edca4684a3989e13b82;p=luatex-ja%2Fluatexja.git lualibs-gzip to lualibs-util-zip --- diff --git a/src/ltj-base.lua b/src/ltj-base.lua index 41caef5..4a95616 100644 --- a/src/ltj-base.lua +++ b/src/ltj-base.lua @@ -226,9 +226,12 @@ end -- But sometimes we want to create only the precompiled cache, -- when its 'text' version is already present in LuaTeX-ja distribution. -require('lualibs-lpeg') -- string.split -require('lualibs-os') -- os.type -require('lualibs-gzip') -- gzip.* +if not os.type then require'lualibs-os' end +if not string.split then require'lualibs-lpeg' end +if not gzip then + if kpse.find_file('lualibs-util-zip', 'lua') then require'lualibs-util-zip' + else require'lualibs-gzip' end +end do local kpse_var_value = kpse.var_value