refactor parallel code

This commit is contained in:
kepler155c@gmail.com
2019-04-05 17:32:22 -04:00
parent d5eb07c3b9
commit 426c856dfb
44 changed files with 3645 additions and 182 deletions

17
openos/hostname.lua Normal file
View File

@@ -0,0 +1,17 @@
local os = _G.os
local shell = require("openos.shell")
local args = shell.parse(...)
local hostname = args[1]
if hostname then
os.setComputerLabel(hostname)
else
hostname = os.getComputerLabel()
if hostname then
print(hostname)
else
io.stderr:write("Hostname not set\n")
return 1
end
end