Bash may not be installed on FreeBSD. Apply minor changes to make this script work with /bin/sh:
- [ ] and = in tests instead of [[ ]] and ==
- Manually expand {a,b} brace lists
I was a little surprised to find brace expansion is not POSIX.
A related bash-to-sh change is in http://reviews.llvm.org/D5631