Always set -euo pipefail in your bash scripts. It tells people who read your code that you actually care about things and that they can come to you if they need someone to talk.