Man gets life sentence for robberies