From 4833d4fc12d57cde9d0b70ff60ff6417b722b38d Mon Sep 17 00:00:00 2001
From: Hans Hagen <pragma@wxs.nl>
Date: Tue, 17 Apr 2012 22:37:00 +0200
Subject: beta 2012.04.17 22:37
---
scripts/context/lua/mtx-context.lua | 1 +
scripts/context/lua/mtxrun.lua | 12 ++++++++++++
scripts/context/stubs/mswin/mtxrun.lua | 12 ++++++++++++
scripts/context/stubs/unix/mtxrun | 12 ++++++++++++
4 files changed, 37 insertions(+)
(limited to 'scripts')
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()
diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua
index 90ebe0b93..87d5c4460 100644
--- a/scripts/context/stubs/mswin/mtxrun.lua
+++ b/scripts/context/stubs/mswin/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()
diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun
index 90ebe0b93..87d5c4460 100755
--- a/scripts/context/stubs/unix/mtxrun
+++ b/scripts/context/stubs/unix/mtxrun
@@ -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()
--
cgit v1.2.3