mirror of
https://github.com/TheLocehiliosan/yadm
synced 2024-10-27 20:34:27 +00:00
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
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 New Issue
Block a user