diff options
Diffstat (limited to 'scripts/context/lua/mtxrun.lua')
-rw-r--r-- | scripts/context/lua/mtxrun.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua index 90ebe0b93..87d5c4460 100644 --- a/scripts/context/lua/mtxrun.lua +++ b/scripts/context/lua/mtxrun.lua @@ -6168,6 +6168,13 @@ local function reportbanner(t) end end +local function reportversion(t) + local banner = t.banner + if banner then + t.report(banner) + end +end + local function reporthelp(t,...) local helpinfo = t.helpinfo if type(helpinfo) == "string" then @@ -6194,6 +6201,7 @@ function logs.application(t) t.report = logs.reporter(t.name) t.help = function(...) reportbanner(t) ; reporthelp(t,...) ; reportinfo(t) end t.identify = function() reportbanner(t) end + t.version = function() reportversion(t) end return t end @@ -16574,6 +16582,10 @@ elseif e_argument("help") and filename=='base' then runners.execute_ctx_script("mtx-base","--help") +elseif e_argument("version") then + + application.version() + elseif e_argument("help") or filename=='help' or filename == "" then application.help() |