From: Benjamin C Meyer Date: Thu, 1 Sep 2011 14:54:29 +0000 (-0400) Subject: Fix OS X sort -V breakage X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=478f5543674fd92006fd07ea3dfefe743f37b7fc;p=git-hooks.git Fix OS X sort -V breakage The -V option to sort is not include in OS X's sort so special case OS X. Signed-off-by: Benjamin C Meyer --- diff --git a/git-hooks b/git-hooks index 3cce242..89f26a8 100755 --- a/git-hooks +++ b/git-hooks @@ -43,7 +43,11 @@ function hook_dirs function list_hooks_in_dir { - find "${1}/" -executable -type f 2>/dev/null | grep -v "^.$" | sort -V + if [ $OSTYPE = "darwin10.0" ] ; then + find "${1}/" -executable -type f 2>/dev/null | grep -v "^.$" | sort + else + find "${1}/" -executable -type f 2>/dev/null | grep -v "^.$" | sort -V + fi } function run_hooks