Skip to content

Commit

Permalink
Revert part of the previous commit as OS X does not support find -typ…
Browse files Browse the repository at this point in the history
…e -f executable and hcount takes a count of the hooks which was removed.
  • Loading branch information
icefox committed Sep 27, 2010
1 parent 2943e8b commit 05a558c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions git-achievements
Expand Up @@ -136,8 +136,8 @@ function check_for_achievements
{
# Anyone know of a cleaner way of checking for hooks?
local gitdir=$(git rev-parse --git-dir 2>/dev/null)
# any executable hooks present that are not samples?
if find $gitdir/hooks/ -type f -executable ! -name "*.sample" | grep -q ""; then
hooks=`ls -F $gitdir/hooks/ 2>/dev/null | grep -e '\*$' | grep -ve 'sample\*$' | wc -l`
if [ ${hooks} -ge 1 ] ; then
hcount_unlock_achievement "Carpenter" "Custom git hooks are installed which help catch issues before they are shared." "$hooks"
fi

Expand Down

0 comments on commit 05a558c

Please sign in to comment.