Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Root = ".Network/"
- local iRoot = ".Network/Info/"
- function clear()
- term.clear()
- term.setCursorPos(1,1)
- end
- function Reset()
- clear()
- term.setTextColor(colors.red)
- write("E-Mail Network")
- term.setTextColor(colors.yellow)
- printTR("- Installer -")
- term.setTextColor(colors.white)
- printTM("[ Client Edition ]")
- w, h = term.getSize()
- print(string.rep("-", w)) write("\n")
- end
- function printTR( text )
- w, h = term.getSize()
- term.setCursorPos(w - #text, 1)
- write(text)
- end
- function printTM( text )
- local w, h = term.getSize()
- term.setCursorPos((w - #text) / 2, 1)
- write(text)
- end
- function printC( text )
- local x, y = term.getSize()
- term.setCursorPos(( x - string.len(text)) / 2, y / 2)
- write( text )
- end
- Reset()
- term.setTextColor(colors.yellow)
- print("Setting Up Directories...")
- os.sleep(1)
- fs.makeDir(Root)
- fs.makeDir(iRoot)
- print("Getting Needed Files...")
- Network = http.get("http://dl.dropbox.com/u/39147094/E-Mail%20Network/Client/Network.lua")
- Startup = http.get("http://dl.dropbox.com/u/39147094/E-Mail%20Network/Client/Startup")
- f = fs.open("startup", "w")
- f.write(Startup.readAll())
- f.close()
- f = fs.open(Root .. "Network.lua", "w")
- f.write(Network.readAll())
- f.close()
- term.setTextColor(colors.lime)
- print("\nDone!")
- os.sleep(1)
- Reset()
- print("E-Mail Server Downloaded Successfully!\nEdition: Client")
- term.setTextColor(colors.yellow)
- print("\n(-)Ok")
- term.setTextColor(colors.white)
- repeat
- event, key = os.pullEvent("key")
- os.sleep(0.1)
- until key == 28
- os.reboot()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement