When replacing a master cylinder, one option is to bench-bleed it. You can pick up a kit that has all the fittings and tubing necessary. Install the fittings and tubes into the outlets you'll be using on the master cylinder. Then direct the tubes into the reservoir and fill it at least halfway with fluid. Push the rod in repeatedly until there isn't any air passing through the tubes.