Install
http://openports.se/sysutils/checkbashisms
and run your bash scripts through it.
If you want to be portable, you can run [pd]ksh with the POSIX options, much like the /bin/sh link in Linux does.
And, beeing OpenBSD stock, ksh code is
audited!