#!/usr/bin/env bash
#
-# Copyright (c) 2010-2013, Benjamin C. Meyer <ben@meyerhome.net>
+# Copyright (c) 2010-2014, Benjamin C. Meyer <ben@meyerhome.net>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
echo "$1 must be run inside a git repository"
return 1
fi
- cd $GITDIR
+ cd "${GITDIR}"
if [ "${1}" = "--install" ] ; then
if [ -d hooks.old ] ; then
echo "hooks.old already exists, perhaps you already installed?"
function list_hooks
{
GITDIR=`git rev-parse --git-dir`
- cat $GITDIR/hooks/pre-commit 2> /dev/null | grep 'git-hooks' > /dev/null 2> /dev/null
+ cat "${GITDIR}/hooks/pre-commit" 2> /dev/null | grep 'git-hooks' > /dev/null 2> /dev/null
if [ $? = 0 ] ; then
echo "Git hooks ARE installed in this repository."
echo ""