diff options
author | Hans Hagen <pragma@wxs.nl> | 2012-04-17 22:37:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2012-04-17 22:37:00 +0200 |
commit | 4833d4fc12d57cde9d0b70ff60ff6417b722b38d (patch) | |
tree | 43cebd2b1df7d4a76a4a2c9dce0e2358296ffbee /scripts | |
parent | 3159b11716778db5ba410914225bfdb6661f292d (diff) | |
download | context-4833d4fc12d57cde9d0b70ff60ff6417b722b38d.tar.gz |
beta 2012.04.17 22:37
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/context/lua/mtx-context.lua | 1 | ||||
-rw-r--r-- | scripts/context/lua/mtxrun.lua | 12 | ||||
-rw-r--r-- | scripts/context/stubs/mswin/mtxrun.lua | 12 | ||||
-rwxr-xr-x | scripts/context/stubs/unix/mtxrun | 12 |
4 files changed, 37 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() 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() |