From: Benjamin C Meyer Date: Wed, 25 Jan 2012 05:37:31 +0000 (-0500) Subject: Remove non-posix shell command flags which is causing problems across OS's. X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=09b39381ecff895d4b3d6f340390ae71af727f2a;p=git-hooks.git Remove non-posix shell command flags which is causing problems across OS's. Signed-off-by: Benjamin C Meyer --- diff --git a/git-hooks b/git-hooks index 3523c1b..9aa0ead 100755 --- a/git-hooks +++ b/git-hooks @@ -43,11 +43,7 @@ function hook_dirs function list_hooks_in_dir { - if [[ $OSTYPE =~ 'darwin' ]] ; then - find "${1}/" -type f 2>/dev/null | grep -v "^.$" | sort - else - find "${1}/" -executable -type f 2>/dev/null | grep -v "^.$" | sort -V - fi + find "${1}/" -perm +111 -type f 2>/dev/null | grep -v "^.$" | sort } function run_hooks