mirror of
https://github.com/Kiritow/OpenComputerScripts.git
synced 2024-03-22 13:10:46 +08:00
Add Updater
This commit is contained in:
parent
c44110819d
commit
9e58cee650
30
update.lua
Normal file
30
update.lua
Normal file
|
@ -0,0 +1,30 @@
|
|||
require("downloader")
|
||||
|
||||
local code_lst=
|
||||
{
|
||||
"SignReader",
|
||||
"checkarg",
|
||||
"class",
|
||||
-- "downloader"
|
||||
"libevent",
|
||||
"libnetwork",
|
||||
-- "mcssh",
|
||||
"queue",
|
||||
"util",
|
||||
"vector"
|
||||
}
|
||||
|
||||
local cnt_all=0
|
||||
for k,v in pairs(code_lst) do
|
||||
cnt_all=cnt_all+1
|
||||
end
|
||||
|
||||
local cnt_now=1
|
||||
|
||||
-- Download from the list
|
||||
for k,v in pairs(code_lst) do
|
||||
print("Updating (" .. cnt_now .. "/" .. cnt_all .. "): " .. v)
|
||||
local x=DownloadFromOCS(v .. ".lua")
|
||||
if(x~=nil) then WriteStringToFile(x,v .. ".lua") end
|
||||
cnt_now = cnt_now + 1
|
||||
end
|
Loading…
Reference in New Issue
Block a user