Adding update mechanism
This commit is contained in:
@@ -5,12 +5,18 @@
|
||||
-- Installation bootstrap
|
||||
--
|
||||
|
||||
local basicFiles = {
|
||||
["Launch.lua"] = "https://raw.githubusercontent.com/Openarl/PathOfBuilding/master/Launch.lua",
|
||||
["Update.lua"] = "https://raw.githubusercontent.com/Openarl/PathOfBuilding/master/Update.lua",
|
||||
}
|
||||
local curl = require("lcurl")
|
||||
local outFile = io.open("Launch.lua", "wb")
|
||||
local easy = curl.easy()
|
||||
easy:setopt_url("https://raw.githubusercontent.com/Openarl/PathOfBuilding/master/Launch.lua")
|
||||
easy:setopt_writefunction(outFile)
|
||||
easy:perform()
|
||||
easy:close()
|
||||
outFile:close()
|
||||
for name, url in pairs(basicFiles) do
|
||||
local outFile = io.open(name, "wb")
|
||||
local easy = curl.easy()
|
||||
easy:setopt_url(url)
|
||||
easy:setopt_writefunction(outFile)
|
||||
easy:perform()
|
||||
easy:close()
|
||||
outFile:close()
|
||||
end
|
||||
Restart()
|
||||
Reference in New Issue
Block a user