Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local shell = require "shell"
- local fs = require "filesystem"
- print("select device to use: ")
- local av = {}
- for f in fs.list("/mnt") do
- av[#av+1] = f
- print(tostring(#av)..". "..f)
- end
- print("autorun.lua will be overwritten!")
- print("device:")
- local d = io.read()
- local path = "/mnt/"..av[tonumber(d)]
- local fh = fs.open(path.."autorun.lua","w")
- fh:write("os.setenv(\"APTROOT\",\""..path.."\")")
- fh:close()
- os.setenv("APTROOT",path)
- shell.execute("wget http://cc.nativehttp.org/p/mpt/mpt "..path.."mpt -f")
- shell.execute(path.."mpt init")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement