travis: anchor grep for astyle

Should not pick up .cmake files (just .c files)
pull/8751/head
Martin Kojtal 2018-11-16 13:38:36 +00:00 committed by GitHub
parent f5ad355854
commit 5299017553
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -129,7 +129,7 @@ matrix:
- astyle --version
script:
# only changed files this time
git diff --name-only --diff-filter=d $TRAVIS_BRANCH | grep '.*\.\(h\|c\|hpp\|cpp\)' | fgrep -v -f .astyleignore | xargs -n 100 -I {} bash -c "astyle -n --options=.astylerc \"{}\"" > astyle-files-changed.out;
git diff --name-only --diff-filter=d $TRAVIS_BRANCH | grep '.*\.\(h\|c\|hpp\|cpp\)$' | fgrep -v -f .astyleignore | xargs -n 100 -I {} bash -c "astyle -n --options=.astylerc \"{}\"" > astyle-files-changed.out;
if [ $(cat astyle-files-changed.out | grep Formatted | wc -l) -ne 0 ]; then
git --no-pager diff;
echo "";