- Move set -e down in the script so that the error-handling at the top (which prints meaningful error messages) isn't short-circuited by the -e.
- when passing in more than one directory, expanded the wrong variable
- astyle can do some things that clang-format doesn't (e.g. adding brackets; you need clang-tidy for that), - clang-format does a much nicer job with lambdas and certain other constructions, - allow passing in directories at a time for formatting.