Pool
This commit is contained in:
parent
4056473705
commit
86ffa5ef9d
4 changed files with 213 additions and 0 deletions
33
poolsclosed/test.lua
Executable file
33
poolsclosed/test.lua
Executable file
|
|
@ -0,0 +1,33 @@
|
|||
#!/usr/bin/env lua
|
||||
|
||||
local m = {}
|
||||
|
||||
print("Hello")
|
||||
os.execute("echo $SHELL")
|
||||
|
||||
m.abc = {
|
||||
kek = 10,
|
||||
}
|
||||
|
||||
function m:print()
|
||||
print(m.abc.kek)
|
||||
end
|
||||
|
||||
function os.getName()
|
||||
local osname
|
||||
-- ask LuaJIT first
|
||||
if jit then
|
||||
return jit.os
|
||||
end
|
||||
|
||||
-- Unix, Linux variants
|
||||
local fh, _ = assert(io.popen("uname -o 2>/dev/null", "r"))
|
||||
if fh then
|
||||
osname = fh:read()
|
||||
end
|
||||
|
||||
return osname or "Windows"
|
||||
end
|
||||
|
||||
m:print()
|
||||
print(os.getName())
|
||||
Loading…
Add table
Add a link
Reference in a new issue