12 posts
Posted 04 June 2013 - 12:30 AM
Topic pretty much says it, what I am trying to accomplish:
A user types 'install' or hits a button and it executes a program that pastebin get's about 5 files.
I don't want to have to pastebin it every time my friend restarts the server, so I feel a command like this would be great.
Thanks for help.
8543 posts
Posted 04 June 2013 - 01:51 AM
Why would you have to download the file every time your friend restarts the server?
871 posts
Posted 04 June 2013 - 08:52 AM
I'm guessing he means resets the world, not just restarts the server.
Two possibilities here. You can make one program that downloads all the other programs from pastebin automatically, or you can actually combine the programs together into a self-extracting package file of some sort. The latter is a bit tricky, but the first is quite easy though, and if you use a pastebin account rather than pasting annonymously, you will be able to update the files without their pastebin codes changing, so the installer will not have to change every time any of the other files change.
Example of the first:
--table of the program names and their pastebin codes to get
--(these codes are made up, no idea what, if anything, they would give you)
local programs = {
program1="abcdefgh",
program2="zyxwvuts",
--can add as many more as you want
}
--loop over table, calling pastebin on each
for name,code in pairs(programs) do
shell.run("pastebin", "get",code,name)
end
12 posts
Posted 04 June 2013 - 07:44 PM
Well damn, that is exactly what I am looking for.
Also, I wanted to make it so I could do it with out my friend, and to cause him no trouble. :)/>