mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 15:36:21 -04:00
make release hook more flexible
This commit is contained in:
parent
fc726204e3
commit
9a9be49b63
|
|
@ -2,9 +2,18 @@
|
|||
|
||||
hook() {
|
||||
local hook=.git/hooks/$1.sh
|
||||
# compat without extname
|
||||
if test ! -f $hook; then
|
||||
hook=.git/hooks/$1
|
||||
fi
|
||||
|
||||
if test -f $hook; then
|
||||
echo "... $1"
|
||||
. $hook
|
||||
if test -x $hook; then
|
||||
$hook
|
||||
else
|
||||
. $hook
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue