summaryrefslogtreecommitdiffstats
path: root/misc/scripts/clang_format.sh
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-07-27 13:27:56 +0200
committerGitHub <noreply@github.com>2020-07-27 13:27:56 +0200
commitbd9fc75768512c1149b2b24f579d144608ffd9b3 (patch)
tree207fe18217cff75a257e274eaca88bf00f005049 /misc/scripts/clang_format.sh
parent08d3d06ed7bdfbc24ce8a2d5ec79567000f8849f (diff)
parentc71e189efd63b3875904d8fe2b8a030e68919aad (diff)
downloadredot-engine-bd9fc75768512c1149b2b24f579d144608ffd9b3.tar.gz
Merge pull request #40706 from akien-mga/style-fix-file_format-macos
Fix code format scripts compat with non-GNU Unices
Diffstat (limited to 'misc/scripts/clang_format.sh')
-rwxr-xr-xmisc/scripts/clang_format.sh4
1 files changed, 1 insertions, 3 deletions
diff --git a/misc/scripts/clang_format.sh b/misc/scripts/clang_format.sh
index 5131f7fe33..e686305dea 100755
--- a/misc/scripts/clang_format.sh
+++ b/misc/scripts/clang_format.sh
@@ -39,11 +39,9 @@ while IFS= read -rd '' f; do
done
git diff > patch.patch
-FILESIZE="$(stat -c%s patch.patch)"
-MAXSIZE=5
# If no patch has been generated all is OK, clean up, and exit.
-if (( FILESIZE < MAXSIZE )); then
+if [ ! -s patch.patch ] ; then
printf "Files in this commit comply with the clang-format style rules.\n"
rm -f patch.patch
exit 0