Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --upload to Market
- tArgs = {...}
- shell.run("clr")
- if #tArgs == 1 then
- print("Usage = market upload [file]")
- end
- if not fs.exists("blueprints") then
- fs.makeDir("blueprints")
- end
- --[[
- if not fs.exists("convert") then
- shell.run("pastebin get NUspW9KB convert")
- end
- ]]
- local files = {
- chicken = "VisRJwkw",
- }
- if tArgs[1] == "upload" then
- if fs.exists("sSchematic") then
- fs.delete("sSchematic")
- end
- -- shell.run("convert toStringFile "..tArgs[2].." sSchematic")
- shell.run("pastebin put sSchematic")
- else
- for i,v in pairs(files) do
- local w = fs.open("blueprints/"..i,"w")
- w.write([[
- local schem = http.get("http://pastebin.com/raw/]]..v..[[").readAll()
- local h = fs.open("temp","w")
- h.write(schem)
- h.close()
- shell.run("convert toByteFile temp ]]..i..[[")
- if fs.exists("temp") then
- fs.delete("temp")
- end
- ]])
- w.close()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement