Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- HttpEnabled = false
- if http then
- HttpEnabled = true
- end
- if fs.exists("/.Dolphin") then
- fs.delete("/.Dolphin")
- end
- if fs.exists("/dolphin") then
- fs.delete("/dolphin")
- end
- fs.makeDir("/.Dolphin")
- fs.makeDir("/.Dolphin/APIs")
- fs.makeDir("/.Dolphin/Resources")
- fs.makeDir("/.Dolphin/Pages")
- local git = "https://raw.github.com/alakazard12/Dolphin/master/"
- local items = {
- ["/dolphin"] = "dolphin";
- ["/.Dolphin/APIs/agui"] = ".Dolphin/APIs/agui";
- ["/.Dolphin/Resources/Main"] = ".Dolphin/Resources/Main";
- ["/.Dolphin/Pages/Home"] = ".Dolphin/Pages/Home";
- ["/.Dolphin/Pages/Search"] = ".Dolphin/Pages/Search";
- ["/.Dolphin/Pages/Server"] = ".Dolphin/Pages/Server";
- }
- local function Download(Link)
- if HttpEnabled == false then
- return
- end
- local File = http.get(Link)
- if not File then
- return
- else
- local ToR = File.readAll()
- File.close()
- return ToR
- end
- end
- for i,v in pairs(items) do
- print("Downloading " .. i)
- local ret = Download(git .. "/" .. v)
- if not ret then
- print("Installation failed")
- break
- else
- print("Installing " .. i)
- local fl = fs.open(i, "w")
- fl.write(ret)
- fl.close()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement