-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding non-main branch name to version report on lmod and settarg and…
… spider commands
- Loading branch information
Robert McLay
committed
Feb 28, 2024
1 parent
dc1afc4
commit 1d1f6ab
Showing
8 changed files
with
37 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -111,6 +111,7 @@ BaseShell = require("BaseShell") | |
Shell = false | ||
local Optiks = require("Optiks") | ||
local Spider = require("Spider") | ||
local Version = require("Version") | ||
local concatTbl = table.concat | ||
local cosmic = require("Cosmic"):singleton() | ||
local dbg = require("Dbg"):dbg() | ||
|
@@ -221,6 +222,14 @@ local function l_add2map(entry, tbl, dirA, moduleFn, kind, rmapT) | |
dbg.fini("l_add2map") | ||
end | ||
|
||
-------------------------------------------------------------------------- | ||
-- Build the version string. | ||
function l_version() | ||
local v = {} | ||
v[#v + 1] = "\nModules based on Lua: Version " .. Version.name().."\n" | ||
v[#v + 1] = " by Robert McLay [email protected]\n\n" | ||
return concatTbl(v,"") | ||
end | ||
-------------------------------------------------------------------------- | ||
-- | ||
-- @param moduleDirA | ||
|
@@ -437,6 +446,11 @@ function main() | |
|
||
local hub = Hub:singleton(false) | ||
|
||
if (optionTbl.version) then | ||
io.stderr:write(version()) | ||
os.exit(0) | ||
end | ||
|
||
for _, v in ipairs(pargs) do | ||
for path in v:split(":") do | ||
local my_path = path_regularize(path) | ||
|
@@ -632,6 +646,13 @@ function options() | |
prt = l_prt, | ||
} | ||
|
||
cmdlineParser:add_option{ | ||
name = {'-v','--version'}, | ||
dest = 'version', | ||
action = 'store_true', | ||
help = "Version info", | ||
} | ||
|
||
cmdlineParser:add_option{ | ||
name = {'-D'}, | ||
dest = 'debug', | ||
|