]> gitweb.fluxo.info Git - git-hooks.git/commitdiff
Remove non-posix shell command flags which is causing problems across OS's.
authorBenjamin C Meyer <ben@meyerhome.net>
Wed, 25 Jan 2012 05:37:31 +0000 (00:37 -0500)
committerBenjamin C Meyer <ben@meyerhome.net>
Wed, 25 Jan 2012 05:39:12 +0000 (00:39 -0500)
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
git-hooks

index 3523c1b996e55d56725f15e0d0a76e778cceac44..9aa0ead138367bcdf3e4913830dcacb60b348674 100755 (executable)
--- 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