Merge "dib-lint: make it work on Mac OS X"

This commit is contained in:
Jenkins 2015-06-29 13:43:07 +00:00 committed by Gerrit Code Review
commit fb52bb0e1e

View file

@ -59,7 +59,7 @@ error() {
} }
rc=0 rc=0
TMPDIR=$(mktemp -d) TMPDIR=$(mktemp -d /tmp/tmp.XXXXXXXXXX)
trap "rm -rf $TMPDIR" EXIT trap "rm -rf $TMPDIR" EXIT
for i in $(find elements -type f \ for i in $(find elements -type f \
-not -name \*~ \ -not -name \*~ \
@ -80,7 +80,7 @@ for i in $(find elements -type f \
flake8 $i flake8 $i
else else
if ! excluded indent ; then if ! excluded indent ; then
if grep -q "^ \{4\}* \{1,3\}[^ ]" ${i}; then if grep -q "^\( \{4\}\)* \{1,3\}[^ ]" ${i}; then
error "$i should use 4 spaces indent" error "$i should use 4 spaces indent"
fi fi
fi fi