bam: adding unix support.
This commit is contained in:
parent
6464838159
commit
1cfd4adca4
4 changed files with 55 additions and 23 deletions
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
local _systems = {
|
||||
"Win32",
|
||||
-- "Linux"
|
||||
"Unix"
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -14,12 +14,19 @@ end
|
|||
-- Detect what system we currently are on.
|
||||
function system()
|
||||
|
||||
local win = os.getenv('OS')
|
||||
|
||||
if win:lower():match('windows') then
|
||||
return _systems[1]
|
||||
if family ~= nil then
|
||||
if family == "windows" then
|
||||
return _systems[1]
|
||||
end
|
||||
if family == "unix" then
|
||||
return _systems[2]
|
||||
end
|
||||
end
|
||||
|
||||
local win = os.getenv('OS')
|
||||
if win ~= nil and win:lower():match('windows') then
|
||||
return _systems[1]
|
||||
end
|
||||
return nil
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue