Fix the check for whether files were modified.

This commit is contained in:
Pentarctagon 2021-04-25 17:54:56 -05:00
parent 78422f46fc
commit e74abf0567
No known key found for this signature in database
GPG key ID: 9456BC54A21DBFA0

View file

@ -36,10 +36,10 @@ execute() {
# check for trailing whitespace in hpp|cpp files
# check for trailing whitespace in lua files
checkindent() {
make -C data/tools reindent &&
find src/ -name \*.\[ch\]pp -print0 | xargs -0 sed -i 's/[[:blank:]]*$//' &&
find data/lua/ -name \*.lua -print0 | xargs -0 sed -i 's/[[:blank:]]*$//' &&
git diff-index --quiet HEAD
make -C data/tools reindent
find src/ -name \*.\[ch\]pp -print0 | xargs -0 sed -i 's/[[:blank:]]*$//'
find data/lua/ -name \*.lua -print0 | xargs -0 sed -i 's/[[:blank:]]*$//'
(( $(git status --short | wc -l) == 0 ))
}
EXIT_VAL=-1