Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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 <ben@meyerhome.net>
  • Loading branch information...
commit 478f5543674fd92006fd07ea3dfefe743f37b7fc 1 parent 792aae9
@icefox authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 git-hooks
View
6 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
Please sign in to comment.
Something went wrong with that request. Please try again.