From c9608d66f802a36a6b6aeeb21a0aa5d263f1087b Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Wed, 5 Mar 2025 01:32:44 -0300 Subject: [wip] generate .lua from .tl files --- bootstrap.tl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bootstrap.tl b/bootstrap.tl index 4ea1896c..14124eb9 100755 --- a/bootstrap.tl +++ b/bootstrap.tl @@ -3,6 +3,8 @@ local PLATFORM = arg[1] or "unix" local lfs = require("lfs") +--local tl = require("tl") +--local tl_env = tl.new_env() local dependencies = { "md5", @@ -284,6 +286,11 @@ local function generate(input_filename: string, entry: Data.LuaEntry): string local content = fd:read("*a"):gsub("^#![^\n]+\n", "") fd:close() +-- local tl_file = input_filename:gsub("%.lua$", ".tl") +-- if lfs.attributes(tl_file) then +-- content = assert(tl.gen(content, tl_env), "failed generating " .. tl_file) +-- end + entry.length = #content return apply_template([[ -- cgit v1.2.3-55-g6feb