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>
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