summaryrefslogtreecommitdiff
path: root/scripts/context/lua
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2012-04-18 00:00:15 +0300
committerMarius <mariausol@gmail.com>2012-04-18 00:00:15 +0300
commit0756a263c41de5279fef717c5b9cca9909308c3a (patch)
tree567d2b2851ff4be9bcc8b23386d2cb0b9e115600 /scripts/context/lua
parentd30dc77c610b72db7e7bc53f2a10e18756cfe437 (diff)
downloadcontext-0756a263c41de5279fef717c5b9cca9909308c3a.tar.gz
beta 2012.04.17 22:37
Diffstat (limited to 'scripts/context/lua')
-rw-r--r--scripts/context/lua/mtx-context.lua1
-rw-r--r--scripts/context/lua/mtxrun.lua12
2 files changed, 13 insertions, 0 deletions
diff --git a/scripts/context/lua/mtx-context.lua b/scripts/context/lua/mtx-context.lua
index 16e8962c4..305236509 100644
--- a/scripts/context/lua/mtx-context.lua
+++ b/scripts/context/lua/mtx-context.lua
@@ -1646,6 +1646,7 @@ elseif environment.argument("ctx") then
elseif environment.argument("mp") or environment.argument("metapost") then
scripts.context.timed(scripts.context.metapost)
elseif environment.argument("version") then
+ application.identify()
scripts.context.version()
elseif environment.argument("touch") then
scripts.context.touch()
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()