aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-10-05 14:56:50 +0200
committerChristian Grothoff <christian@grothoff.org>2019-10-05 14:56:50 +0200
commit5a065f662988dfd0e5295ba5006bda1927c82763 (patch)
tree69f7204c6dfc7372837431167484842ca425afbb /contrib
parentdda0c6ca7ed369fdacbece6a04ac6cc250319a7f (diff)
downloadgnunet-5a065f662988dfd0e5295ba5006bda1927c82763.tar.gz
gnunet-5a065f662988dfd0e5295ba5006bda1927c82763.zip
fix hook to only apply to C code
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/uncrustify_precommit26
1 files changed, 13 insertions, 13 deletions
diff --git a/contrib/uncrustify_precommit b/contrib/uncrustify_precommit
index a370277cc..bfea10304 100755
--- a/contrib/uncrustify_precommit
+++ b/contrib/uncrustify_precommit
@@ -10,19 +10,19 @@ crustified=""
10 10
11for f in $changed; 11for f in $changed;
12do 12do
13 # compare result of uncrustify with changes 13 if echo $f | grep \\.[c,h]\$ > /dev/null
14 # 14 then
15 # only change any of the invocations here if 15 # compare result of uncrustify with changes
16 # they are portable across all cmp and shell 16 #
17 # implementations ! 17 # only change any of the invocations here if
18 uncrustify - q - c uncrustify.cfg - f $f | cmp - s $f - 18 # they are portable across all cmp and shell
19 if test $? = 1 ; 19 # implementations !
20 then 20 uncrustify - q - c uncrustify.cfg - f $f | cmp - s $f -
21 if echo $f | grep \\.[c,h]\$ > /dev/null 21 if test $? = 1 ;
22 then 22 then
23 crustified=" $crustified $f" 23 crustified=" $crustified $f"
24 RET=1 24 RET=1
25 fi 25 fi
26 fi 26 fi
27done 27done
28 28