chore(style): add shebang, set bash strict mode, create function