diff options
author | dvs1 | 2024-11-04 15:54:24 +1000 |
---|---|---|
committer | dvs1 | 2024-11-04 15:54:24 +1000 |
commit | bcc6ec770529a4d41680277be716861c5cd9eed3 (patch) | |
tree | 478537bfac495808f6eee9be82c65daa65145d3c | |
parent | No need for Help here now that it can find it's README. (diff) | |
download | JackOnAllDevices-bcc6ec770529a4d41680277be716861c5cd9eed3.zip JackOnAllDevices-bcc6ec770529a4d41680277be716861c5cd9eed3.tar.gz JackOnAllDevices-bcc6ec770529a4d41680277be716861c5cd9eed3.tar.bz2 JackOnAllDevices-bcc6ec770529a4d41680277be716861c5cd9eed3.tar.xz |
Switch confFile to name, to be used more genericaly.
-rwxr-xr-x | PolygLua.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/PolygLua.lua b/PolygLua.lua index e4cf6db..77f01f4 100755 --- a/PolygLua.lua +++ b/PolygLua.lua | |||
@@ -100,7 +100,7 @@ _.usage = function(args, options, all) | |||
100 | end | 100 | end |
101 | end | 101 | end |
102 | 102 | ||
103 | _.parse = function(args, options, confFile) | 103 | _.parse = function(args, options, name) |
104 | local o = nil | 104 | local o = nil |
105 | 105 | ||
106 | local doIt = function(name, val, a, args, i) | 106 | local doIt = function(name, val, a, args, i) |
@@ -113,9 +113,9 @@ _.parse = function(args, options, confFile) | |||
113 | return o | 113 | return o |
114 | end | 114 | end |
115 | 115 | ||
116 | if nil ~= confFile then | 116 | if nil ~= name then |
117 | for i,v in ipairs{'/etc/', '~/.', './.'} do | 117 | for i,v in ipairs{'/etc/', '~/.', './.'} do |
118 | local p = v .. confFile .. '.conf.lua' | 118 | local p = v .. name .. '.conf.lua' |
119 | local h = io.open(p, 'r') | 119 | local h = io.open(p, 'r') |
120 | if nil ~= h then | 120 | if nil ~= h then |
121 | D('Found configuration file '.. p) | 121 | D('Found configuration file '.. p) |