cc-stuff/fetch.lua
2025-08-18 17:23:16 -04:00

16 lines
365 B
Lua

-- Program to fetch other programs
local filename = arg[1]
local url = "https://git.emersonmakes.com" ..
"/filigreed/cc-stuff/raw/branch/main/" ..
filename
result = http.get(url)
if result == nil then
print(filename .. " is not a valid file to fetch.")
os.exit(1)
end
local file = fs.open(filename, "w")
file.write(result.readAll())
file.close()