Do you mind me modifying it to allow some of my programs to be installed too?
As long as you give me credit, I don't mind :)/>/> If you take a look at my Github you will find a
program versions file that's where the dark retriever gets its info.
I tried to figure it out however what exactly do I need to change? here is my copy of
your My
repo
Like in my example above:
["server"]={ --program name ["GitURL"]="https://raw.github.com/darkrising/darkprograms/darkprograms/darksecurity/server.lua", --direct url to the program. ["Version"]=6.301, --version ["Type"]="program", --category ["Name"]="Dark Programs Server", --Actual name of the program ["Description"]="Dark Programs Base Security Server", --A small description of what it does or is ["Author"]="Darkrising", --Author ["Package"]="Dark Security", --Package the program is located },
So if you had a program called potato
["potato"]={ ["GitURL"]="http://www.some.url.com/potato", ["Version"]=1.0, ["Type"]="program", ["Name"]="An epic potato program", ["Description"]="Potatos are epic", ["Author"]="MrPotato", ["Package"]="PotatoPrograms", },
Edit also for auto-update:
Spoiler
From my api I have this function function gitUpdate(ProgramName, Filename, ProgramVersion) if http then local getGit = http.get("https://raw.github.com/darkrising/darkprograms/darkprograms/programVersions") local getGit = getGit.readAll() NVersion = textutils.unserialize(getGit) if NVersion[ProgramName].Version > ProgramVersion then getGit = http.get(NVersion[ProgramName].GitURL) getGit = getGit.readAll() local file = fs.open(Filename, "w") file.write(getGit) file.close() return true end else return false end end
And my program calls it in the form of: if AutoUpdate == true then if ((dark.gitUpdate("server", shell.getRunningProgram(), Version) == true) or (dark.gitUpdate("dark", "dark", dark.DARKversion) == true)) then os.reboot() end end