Adding update mechanism

This commit is contained in:
Openarl
2016-05-16 23:16:49 +10:00
parent 93d64a47b5
commit 389a377b31
5 changed files with 249 additions and 11 deletions

View File

@@ -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()