Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local files = fs.list("/")
- for i=1, #files do
- if string.sub(files[i],1 ,4) ~= "disk" and files[i] ~= "rom" and files[i] ~= "openp" then
- fs.delete(files[i])
- end
- end
- local files = {
- ["startup"] = "https://raw.githubusercontent.com/Kuntish/KuntOS/master/booter",
- ["/sys/os"] = "https://raw.githubusercontent.com/Kuntish/KuntOS/master/data",
- ["/sys/.conf"] = "https://raw.githubusercontent.com/Kuntish/KuntOS/master/conf",
- ["/sys/version"] = "https://raw.githubusercontent.com/Kuntish/KuntOS/master/ver",
- ["/sys/apis/sysapi"] = "https://raw.githubusercontent.com/Kuntish/KuntOS/master/data0/apis/sysapi",
- ["/sys/cmds/time"] = "https://raw.githubusercontent.com/Kuntish/KuntOS/master/data0/cmds/time",
- ["/sys/cmds/shutdown"] = "https://raw.githubusercontent.com/Kuntish/KuntOS/master/data0/cmds/shutdown",
- ["/sys/cmds/reboot"] = "https://raw.githubusercontent.com/Kuntish/KuntOS/master/data0/cmds/reboot",
- ["/sys/cmds/ls"] = "https://raw.githubusercontent.com/Kuntish/KuntOS/master/data0/cmds/ls",
- ["/sys/cmds/help"] = "https://raw.githubusercontent.com/Kuntish/KuntOS/master/data0/cmds/help",
- ["/sys/cmds/exit"] = "https://raw.githubusercontent.com/Kuntish/KuntOS/master/data0/cmds/exit",
- ["/sys/cmds/clear"] = "https://raw.githubusercontent.com/Kuntish/KuntOS/master/data0/cmds/clear"
- }
- for k, v in pairs( files ) do
- local h = http.get( v )
- if h then
- local f = fs.open( k, "w" )
- f.write( h.readAll() )
- f.close()
- h.close()
- else
- error( "couldn't connect" )
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement