Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- OC-OS v2 Installer. Disk bootable. --
- -- Setup
- local sUrl = "https://raw.githubusercontent.com/ocawesome101/oc-os-2/master/"
- local dirs = ("/startup", "/boot/ocos", "/ocos/sys/core", "/ocos/sys/apis", "/ocos/sys/userdata", "/ocos/programs", "/ocos/users")
- local files = {"/startup/00_bios.lua", "/boot/ocos/boot.lua", "/ocos/boot.lua", "/ocos/sys/core/start.lua", "/ocos/sys/apis/shell.lua", "/ocos/programs/login.lua", "/ocos/sys/userdata/names", "/ocos/sys/userdata/passwords"}
- local function log(msg)
- term.setTextColor(colors.green)
- write("-> ")
- term.setTextColor(colors.yellow)
- print(msg)
- sleep(0.05)
- end
- local function get(url)
- local response = http.get(url, nil, true)
- if not response then
- log("Failed.")
- return nil
- end
- local sResponse = response.readAll()
- response.close()
- return sResponse
- end
- local function dl(file)
- log("Downloading " .. file)
- local data = get(sUrl .. file)
- local handle = fs.open(file)
- handle.write(data)
- handle.close()
- end
- local function checkDirs(tDirs)
- for i=1, #tDirs, 1 do
- if fs.exists(tDirs[i])
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement