local REQUIRED_FILES = { { name = "branchminer" , pastebinCode = "8h40aFWq" }, { name = "lib_turtle_0.2.3", pastebinCode = "H5Q2E5PA" }, { name = "lib_neko_0.1.1" , pastebinCode = "5D2UpDKN" }, { name = "lib_log" , pastebinCode = "vMFb2Ske" }, } local files = { } for _, val in ipairs(REQUIRED_FILES) do if fs.exists(val.name) then table.insert(files, val.name) end end if 0 < #files then for _, val in ipairs(files) do print(val) end print(tostring(#files) .. " file(s) exists.") print("overwrite? (y/n)") local ch = read() if ch ~= "y" then print("Installation was canceled.") return end for _, val in ipairs(files) do fs.delete(val) end end print("Installing...") for _, val in ipairs(REQUIRED_FILES) do shell.run("pastebin get " .. val.pastebinCode .. " " .. val.name) end print("Installation was completed.")