This commit is contained in:
Robert Jelic
2025-02-16 15:12:20 +01:00
parent 5ab0dbf570
commit ebd4cc0010
2 changed files with 9 additions and 0 deletions

View File

@@ -201,4 +201,5 @@ function basalt.getAPI(name)
return elementManager.getAPI(name)
end
return basalt

View File

@@ -1,8 +1,16 @@
local function ensureDirectory(path)
local dir = path:match("(.*)/[^/]*$")
if dir then
os.execute('mkdir -p "' .. dir .. '"')
end
end
local function processFile(inputFile, outputFile)
local f = io.open(inputFile, "r")
local content = f:read("*all")
f:close()
ensureDirectory(outputFile)
local out = io.open(outputFile, "w")
out:write(content)