Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --this script combines all parts of past install Scripts CCSPS used
- local tArg = {...}
- local Path = tArg[1]
- local Code = tArg[2]
- local Type = tArg[3]
- local KeyWords = {"os.reboot","os.shutDown()","settings.clear"}
- local Accept = true
- settings.load(".settings")
- function ScanFile()
- for i = 1, #KeyWords do
- ScanKey(KeyWords[i])
- end
- end
- function ScanKey(Word)
- local file = fs.open(Path,"r")
- local Line = file.readAll()
- local Search = string.find(Line,Word)
- if Search then
- Accept = false
- end
- file.close()
- end
- function SetupFile_Client()
- local AppPaths = settings.get("ClientApps_Paths")
- local AppNames = settings.get("ClientApps_Names")
- AppPaths[#AppPaths + 1] = Path
- AppNames[#AppNames + 1] = tArg[4]
- settings.set("ClientApps_Paths",AppPaths)
- settings.set("ClientApps_Names",AppNames)
- settings.save(".settings")
- local Pa = fs.combine("os/System/Client/Files/AppStore",tArg[4])
- local file = fs.open(Pa,"w")
- local Data = {Path,"1.0.0"}
- file.write(textutils.serialize(Data))
- file.close()
- shell.run("os/System/Scripts/ShortcutWriter",tArg[4],Path,tArg[5])
- end
- function CheckType()
- if Type == "Client" then
- SetupFile_Client()
- elseif Type == "Extension" then
- end
- end
- settings.load(".settings")
- local Paster = settings.get("osPaster")
- shell.run(Paster,"get",Code,Path)
- ScanFile()
- if Accept == true then
- CheckType()
- else
- fs.delete(Path)
- end
Add Comment
Please, Sign In to add comment