3 if [ "$1" = "-h" ]; then
4 echo $0': usage: check-commit [<gitref>]'
14 REPOSIT_NAME
=`basename $PWD`
16 [ "$REPOSIT_NAME" == "" ] && echo No repository found
&& exit 1;
18 OWEB
="-H -cP -cY -l256"
20 # The copyright pattern to check
23 # Pathnames matching the regexp will be excluded from the test
26 # Source .git-pre-commit hook for user's defined rules
28 [ -f $HOME/.git-pre-commit
] && source $HOME/.git-pre-commit
$REPOSIT_NAME
30 mkdir
-p /tmp
/check-commit
32 git
diff --name-only ${REF}^..
$REF | \
34 bfile
=$
(basename $file)
35 git show
$REF:$file > "/tmp/check-commit/$bfile"
36 style_checker
$SC_OPTS -n "$file" "/tmp/check-commit/$bfile"
39 rm -fr /tmp
/check-commit