From 1e1611d59c35ab97e9e76edca4684a3989e13b82 Mon Sep 17 00:00:00 2001 From: Hironori Kitagawa Date: Thu, 6 Oct 2022 08:18:09 +0900 Subject: [PATCH] lualibs-gzip to lualibs-util-zip --- src/ltj-base.lua | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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 -- 2.11.0