Man gets two years for bank hold-ups