Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print ("OpenOS Nick Chi Shell 1.1")
- --local arg = {...}
- --local proxy
- local fs = require("filesystem")
- local dir = "/mnt"
- local binpath = '/home/bin'
- local etcpath = '/home/etc'
- local shell = require('shell')
- -- Добавить свой путь для своих скриптов
- print('Добавить свой путь для своих скриптов :', binpath);
- shell.setPath(shell.getPath() .. ":"..binpath)
- local function installSoft(namesoft, pastebinid)
- local filename = binpath..'/'..namesoft..'.lua';
- local mc_success, mc_reason = shell.execute('wget https://pastebin.com/raw/'..pastebinid..' '..filename)
- if not mc_success then
- print(mc_reason)
- else
- print ("Установка ["..namesoft.."] .. ok!")
- end
- end
- local function installEtc()
- local success, reason = shell.execute('mkdir '..etcpath)
- if not success then
- print(reason)
- else
- end
- end
- local function installConfig(confname, pastebinid)
- local filename = etcpath..'/'..confname;
- local mc_success, mc_reason = shell.execute('wget https://pastebin.com/raw/'..pastebinid..' '..filename)
- if not mc_success then
- print(mc_reason)
- else
- print ("Установка ["..filename.."] .. ok!")
- end
- end
- -- Загрузка ПО
- print ("Загрузка и установка ПО")
- installEtc()
- local success, reason = shell.execute('mkdir '..binpath)
- if not success then
- print(reason)
- else
- shell.execute('echo /home/bin/myresolution.lua > /home/.shrc')
- print ("Edit /home/.shrc ")
- installSoft('mc','kE3jp6nD')
- installSoft('mc2','NRiG4D8M')
- installSoft('fire','qcibULvS')
- installSoft('send','drLwaFrX')
- installSoft('red','Hew7P7uY')
- installSoft('modem_getmes','WfPMz5Kn')
- installSoft('myresolution','aSnCpH2c')
- installSoft('medit','aMyJZkVr')
- installConfig('edit.cfg','aMyJZkVr')
- installSoft('snd','dkk9HgsG')
- installSoft('ftp','UPcwLA9e')
- -- Ставим либы
- shell.execute('pastebin get E0SzJcCx /lib/thread.lua')
- --http://computercraft.ru/topic/634-mnogopotochnost-v-opencomputers/
- -- shell.execute('pastebin get iKzRve2g /lib/forms.lua')
- --http://computercraft.ru/topic/1016-oc-lyogkaia-biblioteka-gui/
- shell.execute('pastebin run ryhyXUKZ')
- --https://github.com/IgorTimofeev/GUI
- --pastebin run 0nm5b1ju
- shell.execute('pastebin get KNmLY5vX /lib/highlighter.lua')
- end
- print ("Установка ПО завершена")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement