summaryrefslogtreecommitdiff
path: root/scripts/context/lua/mtx-check.lua
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/context/lua/mtx-check.lua')
-rw-r--r--scripts/context/lua/mtx-check.lua22
1 files changed, 15 insertions, 7 deletions
diff --git a/scripts/context/lua/mtx-check.lua b/scripts/context/lua/mtx-check.lua
index 7704d86ae..e0ab3b882 100644
--- a/scripts/context/lua/mtx-check.lua
+++ b/scripts/context/lua/mtx-check.lua
@@ -6,6 +6,18 @@ if not modules then modules = { } end modules ['mtx-check'] = {
license = "see context related readme files"
}
+local helpinfo = [[
+--convert check tex file for errors
+]]
+
+local application = logs.application {
+ name = "mtx-check",
+ banner = "Basic ConTeXt Syntax Checking 0.10",
+ helpinfo = helpinfo,
+}
+
+local report = application.report
+
scripts = scripts or { }
scripts.checker = scripts.checker or { }
@@ -123,17 +135,13 @@ function scripts.checker.check(filename)
end
end
-logs.extendbanner("Basic ConTeXt Syntax Checking 0.10")
-
-messages.help = [[
---convert check tex file for errors
-]]
-
if environment.argument("check") then
scripts.checker.check(environment.files[1])
elseif environment.argument("help") then
- logs.help(messages.help)
+ application.help()
elseif environment.files[1] then
scripts.checker.check(environment.files[1])
+else
+ application.help()
end