Some initial tweaks to hooks
* No not require `.sh` extension. Hooks can be written in any language. * Use `[` for the `-x` test * Clean up debug message and formatting
This commit is contained in:
parent
df21cd2cb8
commit
880964e2b2
1 changed files with 6 additions and 5 deletions
11
yadm
11
yadm
|
@ -857,14 +857,15 @@ function error_out() {
|
|||
|
||||
}
|
||||
|
||||
#: ****** Hook handler ******S
|
||||
function invoke_hook() {
|
||||
hook_name=$1
|
||||
|
||||
if [[ -x "$YADM_DIR/hooks/$hook_name.sh" ]] ; then
|
||||
debug "invoking hook: $hook_name"
|
||||
$YADM_DIR/hooks/$hook_name.sh
|
||||
hook_name="$1"
|
||||
|
||||
if [ -x "$YADM_DIR/hooks/$hook_name" ] ; then
|
||||
debug "Invoking hook: $hook_name"
|
||||
"$YADM_DIR/hooks/$hook_name"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
#; ****** Auto Functions ******
|
||||
|
|
Loading…
Reference in a new issue