If you are completely new to live poker, it probably does not make any sense to think about a bankroll before even trying it. A bankroll is meant to make sure, you can continue to play without going broke due to variance, if you are a winning player. So the time to think about a bankroll will be, if you decide, that yes you like live poker, and you are going to play say 2-3 evenings every week in your local casino. Until then it makes more sense to take about a budget for the evening, as Jillychemung say.
As for playing online as a preparation for live poker, the main point is to improve rather than "build a bankroll". If you can beat 10NL cash games online, then you can almost certainly also beat soft 1/2 live games in a casino. At least when you get used to the live environment and develop a good poker face etc. So there is no reason to continue with
online poker just to build up a bankroll for live poker. At least not if you have the option to save up money from your payroll and create the bankroll that way. For instance you can set aside 500$ every month, and then within a year you will have 6.000$, which should be plenty for 1/2.