Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- args = {...}
- command = args[1]
- args[2] = args[2] or "san"
- programs = {}
- programs["san"] = "wf2EBfvT"
- programs["cls"] = "Ckf4bxfQ"
- programs["fills"] = "zkPJLV2w"
- programs["lminer"] = "qG5nT0VD"
- programs["lquarry"] = "Y6mk3pA3"
- programs["room"] = "v81emuWY"
- programs["san-pb"] = "EtCY6w2W"
- programs["quarry"] = "xGLQ121K"
- programs["floor"] = "HsqhM1Bp"
- programs["stairway"] = "UmqQ2YH0"
- programs["reactor"] = "bktGEbgu"
- programs["bucketfill"] = "vW0bjwaR"
- programs["beacon"] = "uDgAEzDg"
- programs["summon"] = "wqaZ4ry3"
- programs["mineos1"] = "VXaqemj5"
- programs["mineos2"] = "c64iXcPZ"
- programs["mtest"] = "eAvNJmHP"
- programs["mcwarp"] = "LNNBBqmk"
- programs["launcher"] = "1FRgEgLW"
- programs["drone"] = "id5WFYST"
- programs["tun"] = "t5ZqDfqM"
- programs["gps"] = "RyYSVTze"
- programs["trainz"] = "TdKkNau4"
- programs["timeserver"] = "0R0DTfWE"
- programs["tunnel"] = "jUTSiwVH"
- programs["tstr"] = "y7uMcaxQ"
- programs["debug"] = "9KjkTLHj"
- programs["sdbuild"] = "zLQNp8s6"
- programs["cat"] = "Vk7jA2h1"
- programs["autosummon"] = "H7cpM963"
- programs["warpctl"] = "cw3pn4Ff"
- programs["turbinectl"] = "81dHPaBG"
- programs["reactorctl"] = "F7M3cE8C"
- programs["ccc"] = "iwxXem48"
- programs["san-bb"] = "gK3LCMmC"
- -- programs[""] = ""
- if not(fs.exists("san-pb")) then
- print("Initial install...")
- shell.run("pastebin","get "..programs["san-pb"].." san-pb")
- end
- function exec(cmd,params)
- shell.run(cmd,params)
- end
- function update(program,hash)
- print("Removing old version of "..program)
- exec("rm",program)
- install(program,hash)
- end
- function install(program,hash)
- print("Installing "..program)
- exec("san-pb","get "..hash.." "..program)
- end
- if command=="update" then
- if programs[args[2]] ~= nil then
- update(args[2],programs[args[2]])
- else
- error("Program "..args[2].." not found in repo")
- end
- elseif command=="install" then
- if programs[args[2]] ~= nil then
- if fs.exists(args[2]) then
- update(args[2],programs[args[2]])
- else
- install(args[2],programs[args[2]])
- end
- else
- error("Program "..args[2].." not found in repo")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment