Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("installer started!")
- administrator = "admin-unlock"
- local function command(c)
- return function(...)
- -- it could be like this, if we didn't care about intercepting I/O
- os.execute(c, ...)
- end
- end
- function cmd(c)
- if c then
- term.setTextColor(colors.green)
- print(textutils.serialize(c))
- else
- term.setTextColor(colors.red)
- end
- command(c)
- end
- function cc()
- term.clear()
- term.setCursorPos(1,1)
- end
- fs.makeDir("system")
- fs.makeDir("system/data")
- fs.makeDir("system/backup")
- fs.makeDir("system/features")
- fs.makeDir("system/installer")
- cmd(shell.run("pastebin get dPdpXBx2 system/features/disable"))
- cmd(shell.setAlias("pastebin","system/pastebin"))
- cmd(shell.setAlias("edit","system/edit"))
- cmd(shell.setAlias("cd","system/cd"))
- cmd(shell.setAlias("copy","system/copy"))
- cmd(shell.setAlias("delete","system/delete"))
- cmd(shell.setAlias("move","system/move"))
- cmd(shell.setAlias("reboot","system/reboot"))
- cmd(shell.setAlias("shutdown","system/shutdown"))
- cmd(shell.setAlias("programs","system/programs"))
- cmd(shell.setAlias("label","system/label"))
- cmd(shell.setAlias("run","system/run"))
- cmd(shell.setAlias("shell","system/shell"))
- cmd(shell.setAlias("lua","system/lua"))
- cmd(shell.run ("set bios.use_multishell false"))
- cmd(shell.run ("set shell.autocomplete false"))
- cmd(shell.run ("set shell.allow_disk_startup false"))
- cmd(shell.run ("set shell.allow_startup true"))
- cmd(shell.run ("set lua.autocomplete false"))
- cmd(shell.run ("set edit.autocomplete false"))
- cmd(shell.clearAlias("mv"))
- cmd(shell.clearAlias("dir"))
- cmd(shell.clearAlias("foreground"))
- cmd(shell.clearAlias("background"))
- cmd(shell.clearAlias("rm"))
- cmd(shell.clearAlias("rs"))
- cmd(shell.clearAlias("cp"))
- cmd(shell.clearAlias("sh"))
- cmd(shell.clearAlias("clr"))
- cmd(shell.clearAlias("ls"))
- cmd(shell.setAlias(administrator..".edit","edit"))
- cmd(shell.setAlias(administrator..".move","move"))
- cmd(shell.setAlias(administrator..".shell","shell"))
- cmd(shell.setAlias(administrator..".delete","delete"))
- cmd(shell.setAlias(administrator..".lua","lua"))
- cmd(shell.setAlias(administrator..".rm","system/features/disable"))
- f = fs.open("system/data/administrator.dat","w")
- f.writeLine(administrator)
- f.close()
- cc()
- term.setTextColor(colors.lightBlue)
- print("SaveOS started!")
- term.setTextColor(colors.white)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement