shell: use more portable way to ensure bash

pointed out by jjlauer (https://github.com/jjlauer)