tools: return exit status in checkpatch.sh

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
This commit is contained in:
Quentin Young 2018-01-30 10:48:03 -05:00
parent f5fd113cbf
commit 1e1c1e132b
No known key found for this signature in database
GPG Key ID: DAF48E0F57E0834F

View File

@ -7,6 +7,7 @@ checkpatch="$tree/tools/checkpatch.pl --no-tree -f"
ignore="ldpd\|babeld"
cwd=${PWD##*/}
dirty=0
stat=0
if [[ -z "$1" || -z "$2" ]]; then
echo "$usage"
@ -66,6 +67,9 @@ else
else
cat $file | grep -v "normally be const" | grep -A3 "ERROR\|WARNING"
fi
if [ "$?" -eq "0" ]; then
stat=1
fi
done
fi
@ -79,3 +83,5 @@ if [ $dirty -eq 1 ]; then
fi
git -C $tree config --unset gc.auto;
fi
exit $stat