Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local args = {...}
- --if not(fs.exists("robtable")) then
- -- print("getting robtable")
- shell.run("delete robtable")
- shell.run("pastebin get qkYQD8xT robtable")
- --end
- os.loadAPI("robtable")
- local files = {}
- local POSSIBLE_FILES = {frame1 = "6his7eC3", frame2 = "tU7KX1c0", frame3 = "qJ8SssBS", frame4 = "6FmdhQBU", frame5 = "Uezue0GT"}
- local FILES_DIR_NAME = "RobMessagingTest"
- --download all pastebin files if they don't exist. put them in RobMessagingTest
- function fetchRequiredFiles(deleteOld)
- print("Fetching files...")
- for key, item in pairs(files) do
- _filePath = FILES_DIR_NAME .. "/" .. item
- if deleteOld and fs.exists(_filePath) then
- shell.run("delete " .. _filePath)
- end
- if not fs.exists(_filePath) then
- print("getting "..item)
- shell.run("pastebin get " .. item .. " " .. _filePath)
- end
- end
- end
- function addRequested()
- --table.insert(files, POSSIBLE_FILES.frame1)
- for _, v in args do
- table.insert(files, POSSIBLE_FILES.v)
- end
- end
- if #args == 0 then
- print("Must specify program names to fetch in arguments.\nPossible names:\n---------------")
- local _tempString = ""
- for k, _ in pairs(POSSIBLE_FILES) do
- _tempString = _tempString .. k .. "\t"
- end
- print(_tempString)
- --robtable.printKV(POSSIBLE_FILES,false)
- else
- print("Used arguments:")
- robtable.printKV(args)
- print("Getting programs requested in args...")
- addRequested()
- robtable.printKV(files)
- fetchRequiredFiles(false)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement