Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- args = {...}
- if not fs.exists("programs.lua") then
- shell.run("pastebin get JNFHN32v programs.lua")
- if args[1] == nil then
- error() -- to exit the program to prevent downloading programs twice
- end
- end
- os.loadAPI("programs.lua")
- function update(prog)
- if fs.exists(prog .. ".lua") then
- fs.delete(prog .. ".lua")
- end
- shell.run("pastebin get " .. programs.mapping[prog] .. " " .. prog .. ".lua")
- end
- if args[1] == nil then
- update("programs")
- elseif args[1] == "all" then
- update("programs")
- for key, value in pairs(programs.mapping) do
- if key ~= "programs" then
- update(key)
- end
- end
- else
- update(args[1])
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement