fix shell when bash is needed instead of sh

Hello Robby

under Debian sh is often aliased to dash, which doesn't support some bashisms (function keyword notably). So I replaced calls to sh with bash.