Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local PASTEBIN_URL = "https://pastebin.com/"
- local PASTEBIN_RAW_URL = "https://pastebin.com/raw/"
- local SEPERATOR = "======================================="
- local PROGDIR = 'OS/PROG/'
- local repo = {
- {
- Name = "FrogpulpOS - Turtle",
- FileName = "os", Id = "rqwVKAfR",
- Path="OS/",
- UsePasteLink = true,
- },
- {
- Name = "FrogpulpOS - Computer",
- FileName = "os", Id = "m4Ljnijb",
- Path="OS/",
- UsePasteLink = true,
- },
- {
- Name = "Turtle - Bore v2.1",
- FileName = "bore_v2-1",
- Id = "VdYprGR1",
- Path = PROGDIR,
- UsePasteLink = true,
- },
- {
- Name = "Turtle - Bore v2",
- FileName = "bore_v2",
- Id = "7h9kZ1ZM",
- Path = PROGDIR,
- UsePasteLink = true,
- },
- {
- Name = "Turtle - Floor",
- FileName = "bore_floor",
- Id = "nMxM1syd",
- Path = PROGDIR,
- UsePasteLink = true,
- },
- {
- Name = "Bore Blacklist [Junk Stone]",
- FileName = "bore_blacklist_junkStone",
- Id = "3dbkNt7w",
- Path = PROGDIR,
- UsePasteLink = false,
- },
- {
- Name = "LabelColor - Disks",
- FileName = "label_disk",
- Id = "wNckUNcx",
- Path = PROGDIR,
- UsePasteLink = true,
- },
- {
- Name = "LabelColor - Computer",
- FileName = "label_computer",
- Id = "LDm4Wp8M",
- Path = PROGDIR,
- UsePasteLink = true,
- },
- {
- Name = "Lava Refuel",
- FileName = "lava_refuel",
- Id = "PJcTmbTp",
- Path = PROGDIR,
- UsePasteLink = true,
- },
- {
- Name = "Lava Refuel - Idle",
- FileName = "lava_refuel_idle",
- Id = "CGescCnf",
- Path = PROGDIR,
- UsePasteLink = true,
- },
- }
- function makeFile(name, repoInd)
- local fi = repo[repoInd]
- local n = fi.Path..name..".lua"
- if fs.exists(n) then shell.run("delete "..n); end
- if fi.UsePasteLink then
- local file = fs.open(n,"w")
- file.write("shell.run(\"pastebin run "..repo[repoInd].Id.."\")")
- file.close()
- else
- shell.run("pastebin get "..fi.Id.." "..fi.Path..fi.FileName..".lua")
- end
- end
- function split(inputstr, sep)
- if sep == nil then
- sep = "%s"
- end
- local t={}
- for str in string.gmatch(inputstr, "([^"..sep.."]+)") do
- table.insert(t, str)
- end
- return t
- end
- function Main()
- coroutine.wrap(function()
- local event, key, isHeld = os.pullEvent("key")
- print(tostring(key))
- if key == keys.up then
- term.scroll(1)
- elseif key == keys.down then
- term.scroll(-1)
- end
- return
- end)()
- --makeFile("installer","Era6PJf4")
- local installedOS = false
- shell.run("clear")
- print(SEPERATOR)
- print("Installer ~")
- print(SEPERATOR)
- for i,paste in pairs(repo) do print(i..". "..paste.Name) end
- print("\nInput files to download: (ex. 1 or 1 3 4, q to quit)\n")
- local txt = io.read()
- local input = split(txt)
- for i,num in pairs(input) do
- if num == "q" then shell.run("reboot") end
- local paste = repo[tonumber(num)]
- if tonumber(num) == 1 then installedOS = true end
- makeFile(paste.FileName,tonumber(num))
- end
- shell.run("clear")
- print(tostring(#input).." files downloaded...")
- os.sleep(1)
- if installedOS then
- shell.run("OS/os.lua")
- else
- shell.run("reboot")
- end
- end
- Main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement