diff --git a/clang-format.bash b/clang-format.bash index 53b7216..c41269c 100755 --- a/clang-format.bash +++ b/clang-format.bash @@ -1,11 +1,11 @@ #! /usr/bin/env bash -shopt -s globstar +shopt -s extglob globstar # Switch to the directory containing the script so that relative paths may be # used. cd "${0%/*}" -files=(**/*.c **/*.cc **/*.h) +files=(!(build)/**/*.c **/*.cc **/*.h) if [ "$1" = check ] then clang-format --verbose --dry-run -Werror ${files[@]}