I posted [mac-dev-playbook](https://github.com/geerlingguy/mac-dev-playbook) (an Ansible-based solution) a few weeks back, and this shell-script approach is in some ways a foil to a more heavyweight setup like the one I'm currently using.
Definitely not saying one way is better than the other, but as I've gone deeper into _needing_ to use more than one Mac, it's been easier to manage things with Ansible (which helps me maintain idempotence and uniformity between machines more easily). But if I were managing one Mac, I would probably lean further towards the simplicity of a script like this one.