Won't get the baby a new bonnet

What is the origin of the phrase, 'This, (or that), won't get the baby a new bonnet'?

There is a phrase used before a gambler tosses the dice. Baby needs a new pair of shoes. Maybe this is a variation.