summaryrefslogtreecommitdiff
path: root/pm.lua
blob: d1323b1a5c753b7832ab4121447b6336ef3136b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
local function dl(filename)
	local file,err=fs.open("/"..filename..".lua","w")
	if err then error("fs.open",err) end
	local res,err = http.get("https://g.gh0.pw/ccprogs/plain/"..filename..".lua")
	if err then error("http.get",err) end
	file.write(res.readAll())
	file.flush()
	file.close()
end

dl(arg[1])