summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/context/lua/mtx-epub.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/context/lua/mtx-epub.lua b/scripts/context/lua/mtx-epub.lua
index 5239028ba..e345ff9fd 100644
--- a/scripts/context/lua/mtx-epub.lua
+++ b/scripts/context/lua/mtx-epub.lua
@@ -89,7 +89,7 @@ function scripts.epub.make()
local specfile = file.replacesuffix(filename,"specification")
local specification = lfs.isfile(specfile) and dofile(specfile) or { }
- inspect(specification)
+ -- inspect(specification)
local name = specification.name or file.removesuffix(filename)
local identifier = specification.identifier or os.uuid()
@@ -101,6 +101,10 @@ function scripts.epub.make()
local epubfile = file.replacesuffix(name,"epub")
local epubroot = file.replacesuffix(name,"opf")
+ lfs.mkdir(epubpath)
+ lfs.mkdir(file.join(epubpath,"META-INF"))
+ lfs.mkdir(file.join(epubpath,"OPS"))
+
local used = { }
for i=1,#files do
@@ -116,10 +120,6 @@ function scripts.epub.make()
container = format(container,epubroot)
package = format(package,identifier,identifier,concat(used,"\n"),root)
- lfs.mkdir(epubpath)
- lfs.mkdir(file.join(epubpath,"META-INF"))
- lfs.mkdir(file.join(epubpath,"OPS"))
-
io.savedata(file.join(epubpath,"mimetype"),mimetype)
io.savedata(file.join(epubpath,"META-INF","container.xml"),container)
io.savedata(file.join(epubpath,"OPS",epubroot),package)