Work out why BwAuth setup.sh doesn't work on macOS

When I run the individual steps, they work fine. But the script itself seems to exit without producing any output.