Advertisement
xeritt

Minecraft Nick Chi MiniOS 1.0

Aug 19th, 2018
294
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.70 KB | None | 0 0
  1. print ("Nick Chi MiniOS 1.0")
  2. local arg = {...}
  3. local proxy
  4. local fs = require("filesystem")
  5. local dir = "/mnt"
  6. local binpath = '/home/bin'
  7.  
  8. if (arg[1]==nil) then
  9.     for entry in fs.list(dir) do
  10.         print(entry)
  11.         proxy = entry:sub(1, -2)
  12.         break
  13.     end
  14. else
  15.     proxy = arg[1]
  16. end
  17.  
  18. print ("Mount disk: "..proxy)
  19. fs.mount(proxy, "/home")
  20. print("Диск замонтирован..ok!")
  21.  
  22. -- Изменить разрешение
  23. local shell = require('shell')
  24. script = 'aSnCpH2c'
  25. print ("Execute "..script)
  26. shell.execute('pastebin run '..script)
  27.  
  28. -- Добавить свой путь для своих скриптов
  29. print('Добавить свой путь для своих скриптов :', binpath);
  30. shell.setPath(shell.getPath() .. ":"..binpath)
  31.  
  32. local function installSoft(namesoft, pastebinid)
  33.     local filename = binpath..'/'..namesoft..'.lua';
  34.     local mc_success, mc_reason = shell.execute('wget https://pastebin.com/raw/'..pastebinid..' '..filename)
  35.     if not mc_success then
  36.         print(mc_reason)
  37.     else
  38.         print ("Установка ["..namesoft.."] .. ok!")
  39.     end
  40. end
  41.  
  42. -- Загрузка ПО
  43. print ("Загрузка и установка ПО")
  44. local success, reason = shell.execute('mkdir '..binpath)
  45. if not success then
  46.     print(reason)
  47. else
  48.     installSoft('mc','kE3jp6nD')
  49.     installSoft('holo','tdxECas7')
  50.     installSoft('fexp','EWBZ9ucB')
  51.     installSoft('gmine','eFkAZP0u')
  52.     installSoft('fire','qcibULvS')
  53.     installSoft('pbin','zuUJ8f8S')
  54.     installSoft('send','UVXt5ZQi')
  55.     installSoft('red','Hew7P7uY')
  56. end
  57. print ("Установка ПО завершена")
  58.  
  59. --local success, reason = shell.execute('ls')
  60. --if not success then
  61. --  print(reason)
  62. --end
  63. --print (success)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement