Make installer dependency-free

This commit is contained in:
osmarks 2018-07-26 11:00:42 +01:00
parent d0490cd4cb
commit 8346354d1e

View File

@ -1,16 +1,13 @@
local d = require "luadash" or _
local wyvern_files = { local wyvern_files = {
root = "https://osmarks.tk/git/osmarks/wyvern/raw/branch/master/", root = "https://osmarks.tk/git/osmarks/wyvern/raw/branch/master/",
files = { "installer.lua", "luadash.lua", "lib.lua" } files = { "installer.lua", "luadash.lua", "lib.lua" }
} }
local args = {...} local args = {...}
local command = args[1] -- native luadash head is broken local command = args[1]
local params = d.tail(args)
local function download_group(g) local function download_group(g)
d.map(g.files, function(file) for _, file in pairs(g.files) do
local url = g.root .. file local url = g.root .. file
local h = http.get(url) local h = http.get(url)
local contents = h.readAll() local contents = h.readAll()
@ -18,7 +15,7 @@ local function download_group(g)
f.write(contents) f.write(contents)
f.close() f.close()
print("Written", file, "from", url) print("Written", file, "from", url)
end) end
end end
local function prompt(msg) local function prompt(msg)