Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local args={...};
- local program;
- local programs=
- {
- {"BranchMining","yQwmA0dx","BranchMine"},
- {"BranchMine Receiver", "R89UWx10", "BMReceiver"},
- {"RedNet Repeater", "MyhY9QNZ", "RNRepeater"},
- {"Crop Collector", "ueUCMwMT", "CC"},
- {"Format", "NtZQEA1X", "format"},
- {"Serpens Quarry","ed8ZAFn6","serpensQuarry"}
- };
- term.clear()
- term.setCursorPos(1, 1);
- print("Which program do you want to install?\n");
- for i=1,#programs
- do
- print(i.."-"..programs[i][1]);
- end
- print("");
- event,char=os.pullEvent("char");
- program=tonumber(char);
- if(program==nil)
- then
- error("No program selected");
- end
- if (program<1 or program>#programs)
- then
- error("No program selected.");
- else
- if (fs.exists(programs[program][3]))
- then
- print(programs[program][1].." already exists!\nDo you want to continue anyway? Y/N");
- event,char=os.pullEvent("char");
- if(char=="y")
- then
- fs.delete(programs[program][3]);
- else
- return;
- end
- end
- shell.run("pastebin", "get", programs[program][2], programs[program][3]);
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement